merge-requests/70/head
unknown 5 years ago
commit ef4cb2f0cb

@ -18,19 +18,21 @@ import '../util/helpers.dart';
const GET_PATIENT_VITAL_SIGN =
BASE_URL + 'Doctors.svc/REST/Doctor_GetPatientVitalSign';
const GET_PATIENT_LAB_OREDERS =BASE_URL + 'DoctorApplication.svc/REST/GetPatientLabOreders';
const GET_PRESCRIPTION =BASE_URL+'Patients.svc/REST/GetPrescriptionApptList';
const GET_RADIOLOGY = BASE_URL+'DoctorApplication.svc/REST/GetPatientRadResult';
const GET_PATIENT_LAB_OREDERS =
BASE_URL + 'DoctorApplication.svc/REST/GetPatientLabOreders';
const GET_PRESCRIPTION = BASE_URL + 'Patients.svc/REST/GetPrescriptionApptList';
const GET_RADIOLOGY =
BASE_URL + 'DoctorApplication.svc/REST/GetPatientRadResult';
class PatientsProvider with ChangeNotifier {
bool isLoading = true;
bool isLoading = false;
bool isError = false;
String error = '';
List<VitalSignResModel> patientVitalSignList = [];
List <LabOrdersResModel>patientLabResultOrdersList = [];
List <PrescriptionResModel>patientPrescriptionsList = [];
List <RadiologyResModel >patientRadiologyList = [];
List<LabOrdersResModel> patientLabResultOrdersList = [];
List<PrescriptionResModel> patientPrescriptionsList = [];
List<RadiologyResModel> patientRadiologyList = [];
Client client =
HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]);
@ -79,6 +81,13 @@ class PatientsProvider with ChangeNotifier {
}
}
setBasicData() {
isLoading = true;
isError = false;
error = '';
notifyListeners();
}
/*
*@author: Elham Rababah
*@Date:27/4/2020
@ -87,6 +96,8 @@ class PatientsProvider with ChangeNotifier {
*@desc: getPatientVitalSign
*/
getPatientVitalSign(patient) async {
setBasicData();
try {
if (await Helpers.checkConnection()) {
final response = await client.post(GET_PATIENT_VITAL_SIGN,
@ -138,6 +149,10 @@ class PatientsProvider with ChangeNotifier {
*@desc: getLabResult Orders
*/
getLabResultOrders(patient) async {
// isLoading = true;
// notifyListeners();
setBasicData();
try {
if (await Helpers.checkConnection()) {
final response = await client.post(GET_PATIENT_LAB_OREDERS,
@ -179,11 +194,15 @@ class PatientsProvider with ChangeNotifier {
*@return:
*@desc: getPatientPrescriptions
*/
getPatientPrescriptions(patient) async {
getPatientPrescriptions(patient) async {
// isLoading = true;
// notifyListeners();
setBasicData();
try {
if (await Helpers.checkConnection()) {
final response = await client.post(GET_PRESCRIPTION,
body: json.encode(patient));
final response =
await client.post(GET_PRESCRIPTION, body: json.encode(patient));
final int statusCode = response.statusCode;
isLoading = false;
@ -197,7 +216,8 @@ getPatientPrescriptions(patient) async {
patientPrescriptionsList = [];
print("res['PatientPrescriptionList']");
res['PatientPrescriptionList'].forEach((v) {
patientPrescriptionsList.add(new PrescriptionResModel.fromJson(v));
patientPrescriptionsList
.add(new PrescriptionResModel.fromJson(v));
});
} else {
isError = true;
@ -221,11 +241,14 @@ getPatientPrescriptions(patient) async {
*@return:
*@desc: getPatientRadiology
*/
getPatientRadiology(patient) async {
getPatientRadiology(patient) async {
// isLoading = true;
// notifyListeners();
setBasicData();
try {
if (await Helpers.checkConnection()) {
final response = await client.post(GET_RADIOLOGY,
body: json.encode(patient));
final response =
await client.post(GET_RADIOLOGY, body: json.encode(patient));
final int statusCode = response.statusCode;
isLoading = false;
@ -239,7 +262,7 @@ getPatientRadiology(patient) async {
patientRadiologyList = [];
print("res['List_GetRadOreders']");
res['List_GetRadOreders'].forEach((v) {
patientRadiologyList.add(new RadiologyResModel .fromJson(v));
patientRadiologyList.add(new RadiologyResModel.fromJson(v));
});
} else {
isError = true;
@ -256,6 +279,4 @@ getPatientRadiology(patient) async {
throw error;
}
}
}

@ -11,6 +11,7 @@ import '../../../../widgets/shared/app_scaffold_widget.dart';
import '../../../../widgets/shared/app_texts_widget.dart';
import '../../../../widgets/shared/card_with_bg_widget.dart';
import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
import '../../../../widgets/shared/profile_image_widget.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -107,17 +108,9 @@ class _LabOrdersScreenState extends State<LabOrdersScreen> {
children: <Widget>[
Row(
children: <Widget>[
CircleAvatar(
radius:
SizeConfig.imageSizeMultiplier *
12,
backgroundImage: NetworkImage(
patientsProv
.patientLabResultOrdersList[
index]
ProfileImageWidget(url:patientsProv
.patientLabResultOrdersList[index]
.doctorImageURL),
backgroundColor: Colors.transparent,
),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(

@ -1,18 +1,17 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/prescription_req_model.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../../config/shared_pref_kay.dart';
import '../../../../models/patient/vital_sign_req_model.dart';
import '../../../../config/size_config.dart';
import '../../../../models/patient/patiant_info_model.dart';
import '../../../../models/patient/prescription_req_model.dart';
import '../../../../providers/patients_provider.dart';
import '../../../../util/dr_app_shared_pref.dart';
import '../../../../widgets/shared/app_scaffold_widget.dart';
import '../../../../widgets/shared/app_texts_widget.dart';
import '../../../../widgets/shared/card_with_bg_widget.dart';
import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
import '../../../../widgets/shared/profile_image_widget.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -109,16 +108,9 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
children: <Widget>[
Row(
children: <Widget>[
CircleAvatar(
radius:
SizeConfig.imageSizeMultiplier *
12,
backgroundImage: NetworkImage(
patientsProv
ProfileImageWidget(url:patientsProv
.patientPrescriptionsList[index]
.doctorImageURL),
backgroundColor: Colors.transparent,
),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(

@ -1,18 +1,17 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/radiology_req_model.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../../config/shared_pref_kay.dart';
import '../../../../models/patient/vital_sign_req_model.dart';
import '../../../../config/size_config.dart';
import '../../../../models/patient/patiant_info_model.dart';
import '../../../../models/patient/radiology_req_model.dart';
import '../../../../providers/patients_provider.dart';
import '../../../../util/dr_app_shared_pref.dart';
import '../../../../widgets/shared/app_scaffold_widget.dart';
import '../../../../widgets/shared/app_texts_widget.dart';
import '../../../../widgets/shared/card_with_bg_widget.dart';
import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
import '../../../../widgets/shared/profile_image_widget.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -51,12 +50,12 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
}
print(type);
RadiologyReqModel radiologyReqModel = RadiologyReqModel(
patientID: patient.patientId,
projectID: patient.projectId,
tokenID: token,
patientTypeID: patient.patientType,
languageID: 2,
);
patientID: patient.patientId,
projectID: patient.projectId,
tokenID: token,
patientTypeID: patient.patientType,
languageID: 2,
);
patientsProv.getPatientRadiology(radiologyReqModel.toJson());
}
@ -108,16 +107,10 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
children: <Widget>[
Row(
children: <Widget>[
CircleAvatar(
radius:
SizeConfig.imageSizeMultiplier *
12,
backgroundImage: NetworkImage(
patientsProv
.patientRadiologyList[index]
.doctorImageURL),
backgroundColor: Colors.transparent,
),
ProfileImageWidget(
url: patientsProv
.patientRadiologyList[index]
.doctorImageURL),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(

@ -1,17 +1,17 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../../config/shared_pref_kay.dart';
import '../../../../config/size_config.dart';
import '../../../../models/patient/patiant_info_model.dart';
import '../../../../models/patient/vital_sign_req_model.dart';
import '../../../../providers/patients_provider.dart';
import '../../../../util/dr_app_shared_pref.dart';
import '../../../../widgets/shared/app_scaffold_widget.dart';
import '../../../../widgets/shared/app_texts_widget.dart';
import '../../../../widgets/shared/card_with_bg_widget.dart';
import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
import '../../../../widgets/shared/profile_image_widget.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -109,16 +109,9 @@ class _VitalSignScreenState extends State<VitalSignScreen> {
children: <Widget>[
Row(
children: <Widget>[
CircleAvatar(
radius:
SizeConfig.imageSizeMultiplier *
12,
backgroundImage: NetworkImage(
patientsProv
ProfileImageWidget(url:patientsProv
.patientVitalSignList[index]
.doctorImageURL),
backgroundColor: Colors.transparent,
),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
@ -60,7 +61,13 @@ class AppScaffold extends StatelessWidget {
}),
centerTitle: true,
actions: <Widget>[
IconButton(icon: Icon(Icons.person), onPressed: null)
// IconButton(icon: Icon(Icons.person), onPressed: null)
ProfileImageWidget(
height: 50,
width: 50,
url:
"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png",
)
],
),
drawer: (pageOnly == true || showAppDrawer == false)

@ -40,15 +40,14 @@ class ProfileImageWidget extends StatelessWidget {
backgroundColor: Colors.transparent,
),
),
Padding(
padding: EdgeInsets.only(top: 10),
child: AppText(
name,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 4,
color: color,
)),
AppText(
name==null || des == null?SizedBox():SizedBox(height: 10,),
name==null?SizedBox():AppText(
name,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 4,
color: color,
),
des==null?SizedBox():AppText(
des,
fontSize: SizeConfig.textMultiplier * 2.5,
)

Loading…
Cancel
Save