merge-requests/531/head
Sultan Khan 5 years ago
commit bf812a77de

@ -238,6 +238,7 @@ const GET_PAtIENTS_INSURANCE_APPROVALS =
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
const GET_IN_PATIENT_ORDERS = 'Services/DoctorApplication.svc/REST/GetPatientRadResult';
///Prescriptions ///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';

@ -1,47 +1,47 @@
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class FinalRadiology { class FinalRadiology {
String setupID; dynamic setupID;
int projectID; dynamic projectID;
Null patientID; dynamic patientID;
int invoiceLineItemNo; dynamic invoiceLineItemNo;
int invoiceNo; dynamic invoiceNo;
int doctorID; dynamic doctorID;
int clinicID; dynamic clinicID;
DateTime orderDate; DateTime orderDate;
String reportData; dynamic reportData;
String imageURL; dynamic imageURL;
String procedureID; dynamic procedureID;
int appointmentNo; dynamic appodynamicmentNo;
Null dIAPacsURL; dynamic dIAPacsURL;
bool isRead; bool isRead;
String readOn; dynamic readOn;
var admissionNo; var admissionNo;
bool isInOutPatient; bool isInOutPatient;
int actualDoctorRate; dynamic actualDoctorRate;
String clinicDescription; dynamic clinicDescription;
String dIAPACSURL; dynamic dIAPACSURL;
String doctorImageURL; dynamic doctorImageURL;
String doctorName; dynamic doctorName;
int doctorRate; dynamic doctorRate;
String doctorTitle; dynamic doctorTitle;
int gender; dynamic gender;
String genderDescription; dynamic genderDescription;
bool isActiveDoctorProfile; bool isActiveDoctorProfile;
bool isExecludeDoctor; bool isExecludeDoctor;
String isInOutPatientDescription; dynamic isInOutPatientDescription;
String isInOutPatientDescriptionN; dynamic isInOutPatientDescriptionN;
String nationalityFlagURL; dynamic nationalityFlagURL;
int noOfPatientsRate; dynamic noOfPatientsRate;
int orderNo; dynamic orderNo;
String projectName; dynamic projectName;
String qR; dynamic qR;
String reportDataHTML; dynamic reportDataHTML;
String reportDataTextString; dynamic reportDataTextdynamic;
List<String> speciality; List<dynamic> speciality;
bool isCVI; bool isCVI;
bool isRadMedicalReport; bool isRadMedicalReport;
bool isLiveCareAppointment; bool isLiveCareAppodynamicment;
FinalRadiology( FinalRadiology(
{this.setupID, {this.setupID,
@ -55,7 +55,7 @@ class FinalRadiology {
this.reportData, this.reportData,
this.imageURL, this.imageURL,
this.procedureID, this.procedureID,
this.appointmentNo, this.appodynamicmentNo,
this.dIAPacsURL, this.dIAPacsURL,
this.isRead, this.isRead,
this.readOn, this.readOn,
@ -80,12 +80,12 @@ class FinalRadiology {
this.projectName, this.projectName,
this.qR, this.qR,
this.reportDataHTML, this.reportDataHTML,
this.reportDataTextString, this.reportDataTextdynamic,
this.speciality, this.speciality,
this.isCVI, this.isCVI,
this.isRadMedicalReport,this.isLiveCareAppointment}); this.isRadMedicalReport,this.isLiveCareAppodynamicment});
FinalRadiology.fromJson(Map<String, dynamic> json) { FinalRadiology.fromJson(Map<dynamic, dynamic> json) {
try { try {
setupID = json['SetupID']; setupID = json['SetupID'];
projectID = json['ProjectID']; projectID = json['ProjectID'];
@ -98,7 +98,7 @@ class FinalRadiology {
reportData = json['ReportData']; reportData = json['ReportData'];
imageURL = json['ImageURL']; imageURL = json['ImageURL'];
procedureID = json['ProcedureID']; procedureID = json['ProcedureID'];
appointmentNo = json['AppointmentNo']; appodynamicmentNo = json['AppodynamicmentNo'];
dIAPacsURL = json['DIAPacsURL']; dIAPacsURL = json['DIAPacsURL'];
isRead = json['IsRead']; isRead = json['IsRead'];
readOn = json['ReadOn']; readOn = json['ReadOn'];
@ -122,20 +122,21 @@ class FinalRadiology {
orderNo = json['OrderNo']; orderNo = json['OrderNo'];
projectName = json['ProjectName']; projectName = json['ProjectName'];
qR = json['QR']; qR = json['QR'];
isLiveCareAppointment = json['IsLiveCareAppointment']; isLiveCareAppodynamicment = json['IsLiveCareAppodynamicment'];
reportDataHTML = json['ReportDataHTML']; reportDataHTML = json['ReportDataHTML'];
reportDataTextString = json['ReportDataTextString']; reportDataTextdynamic = json['ReportDataTextdynamic'];
// speciality = json['Speciality'].cast<String>(); // speciality = json['Speciality'].cast<dynamic>();
isCVI = json['isCVI']; isCVI = json['isCVI'];
isRadMedicalReport = json['isRadMedicalReport']; isRadMedicalReport = json['isRadMedicalReport'];
} catch (e) { } catch (e) {
print(e); print(e);
} }
} }
Map<String, dynamic> toJson() { Map<dynamic, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<dynamic, dynamic> data = new Map<dynamic, dynamic>();
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID;
@ -147,7 +148,7 @@ class FinalRadiology {
data['ReportData'] = this.reportData; data['ReportData'] = this.reportData;
data['ImageURL'] = this.imageURL; data['ImageURL'] = this.imageURL;
data['ProcedureID'] = this.procedureID; data['ProcedureID'] = this.procedureID;
data['AppointmentNo'] = this.appointmentNo; data['AppodynamicmentNo'] = this.appodynamicmentNo;
data['DIAPacsURL'] = this.dIAPacsURL; data['DIAPacsURL'] = this.dIAPacsURL;
data['IsRead'] = this.isRead; data['IsRead'] = this.isRead;
data['ReadOn'] = this.readOn; data['ReadOn'] = this.readOn;
@ -172,7 +173,7 @@ class FinalRadiology {
data['ProjectName'] = this.projectName; data['ProjectName'] = this.projectName;
data['QR'] = this.qR; data['QR'] = this.qR;
data['ReportDataHTML'] = this.reportDataHTML; data['ReportDataHTML'] = this.reportDataHTML;
data['ReportDataTextString'] = this.reportDataTextString; data['ReportDataTextdynamic'] = this.reportDataTextdynamic;
data['Speciality'] = this.speciality; data['Speciality'] = this.speciality;
data['isCVI'] = this.isCVI; data['isCVI'] = this.isCVI;
data['isRadMedicalReport'] = this.isRadMedicalReport; data['isRadMedicalReport'] = this.isRadMedicalReport;
@ -181,7 +182,7 @@ class FinalRadiology {
} }
class FinalRadiologyList { class FinalRadiologyList {
String filterName = ""; dynamic filterName = "";
List<FinalRadiology> finalRadiologyList = List(); List<FinalRadiology> finalRadiologyList = List();
FinalRadiologyList({this.filterName, FinalRadiology finalRadiology}) { FinalRadiologyList({this.filterName, FinalRadiology finalRadiology}) {

@ -28,12 +28,20 @@ class RadiologyService extends BaseService {
} }
Future getPatientRadOrders(PatiantInformtion patient) async { Future getPatientRadOrders(PatiantInformtion patient) async {
String url = GET_PATIENT_ORDERS;
if(patient.patientType == 1) {
url = GET_IN_PATIENT_ORDERS;
}
hasError = false; hasError = false;
await baseAppClient.postPatient(GET_PATIENT_ORDERS, await baseAppClient.postPatient(url,
patient: patient, patient: patient,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
finalRadiologyList.clear(); finalRadiologyList.clear();
response['ListRAD'].forEach((radiology) { String label = "ListRAD";
if(patient.patientType == 1) {
label ="List_GetRadOreders";
}
response[label].forEach((radiology) {
finalRadiologyList.add(FinalRadiology.fromJson(radiology)); finalRadiologyList.add(FinalRadiology.fromJson(radiology));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {

@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/lab_result/laboratory_result_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/laboratory_result_page.dart';
import 'package:doctor_app_flutter/screens/procedures/add_lab_orders.dart'; import 'package:doctor_app_flutter/screens/procedures/add_lab_orders.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -91,62 +92,16 @@ class LabsHomePage extends StatelessWidget {
), ),
), ),
if (patientType != null && patientType == '7' && patient.patientStatusType == 43) if (patientType != null && patientType == '7' && patient.patientStatusType == 43)
InkWell( AddNewOrder( onTap: () {
onTap: () { Navigator.push(
Navigator.push( context,
context, MaterialPageRoute(
MaterialPageRoute( builder: (context) => AddSelectedLabOrder(
builder: (context) => AddSelectedLabOrder( patient: patient,
patient: patient, model: model,
model: model, )),
)), );
); },label: 'Apply for New Lab Order',),
},
// () {
// addSelectedLabOrder(context, model, patient);
// },
child: Container(
width: double.maxFinite,
height: 140,
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(10),
),
child: Center(
child: Container(
height: 90,
child: Column(
children: [
Container(
height: 40,
width: 40,
decoration: BoxDecoration(
color: Colors.grey[600],
borderRadius: BorderRadius.circular(10),
),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
),
),
SizedBox(
height: 10,
),
AppText(
'Apply for New Lab Order',
color: Colors.grey[600],
fontWeight: FontWeight.w600,
)
],
),
),
),
),
),
...List.generate( ...List.generate(
model.patientLabOrdersList.length, model.patientLabOrdersList.length,
(index) => Column( (index) => Column(

@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_
import 'package:doctor_app_flutter/screens/procedures/add_radiology_order.dart'; import 'package:doctor_app_flutter/screens/procedures/add_radiology_order.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -88,61 +89,16 @@ class RadiologyHomePage extends StatelessWidget {
if (patientType != null && if (patientType != null &&
patientType == '7' && patientType == '7' &&
patient.patientStatusType == 43) patient.patientStatusType == 43)
InkWell( AddNewOrder( onTap: () {
onTap: () { Navigator.push(
Navigator.push( context,
context, MaterialPageRoute(
MaterialPageRoute( builder: (context) => AddSelectedRadiologyOrder(
builder: (context) => AddSelectedRadiologyOrder( patient: patient,
patient: patient, model: model,
model: model, )),
)), );
); },label: 'Apply for Radiology Order',),
},
// () {
// addSelectedRadiologyOrder(context, model, patient);
// },
child: Container(
width: double.maxFinite,
height: 140,
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(10),
),
child: Center(
child: Container(
height: 90,
child: Column(
children: [
Container(
height: 40,
width: 40,
decoration: BoxDecoration(
color: Colors.grey[600],
borderRadius: BorderRadius.circular(10),
),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
),
),
SizedBox(
height: 10,
),
AppText(
'Apply for Radiology Order',
color: Colors.grey[600],
fontWeight: FontWeight.w600,
)
],
),
),
),
),
),
...List.generate( ...List.generate(
model.radiologyList.length, model.radiologyList.length,
(index) => InkWell( (index) => InkWell(
@ -155,13 +111,13 @@ class RadiologyHomePage extends StatelessWidget {
), ),
), ),
), ),
child: DoctorCard( child: DoctorCard(
doctorName: model.radiologyList[index].doctorName, doctorName: model.radiologyList[index].doctorName,
profileUrl: model.radiologyList[index].doctorImageURL, profileUrl: model.radiologyList[index].doctorImageURL,
invoiceNO: '${model.radiologyList[index].invoiceNo}', invoiceNO: '${model.radiologyList[index].invoiceNo}',
branch: '${model.radiologyList[index].projectName}', branch: '${model.radiologyList[index].projectName}',
clinic: model.radiologyList[index].clinicDescription, clinic: model.radiologyList[index].clinicDescription,
appointmentDate: model.radiologyList[index].orderDate, appointmentDate: model.radiologyList[index].orderDate ?? model.radiologyList[index].reportData,
), ),
)), )),
if(model.radiologyList.isEmpty && patient.patientStatusType != 43) if(model.radiologyList.isEmpty && patient.patientStatusType != 43)

@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/screens/prescription/add_prescription_form.da
import 'package:doctor_app_flutter/screens/prescription/prescription_items_page.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_items_page.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -86,52 +87,10 @@ class PrescriptionsPage extends StatelessWidget {
if (patientType != null && if (patientType != null &&
patientType == '7' && patientType == '7' &&
patient.patientStatusType == 43) patient.patientStatusType == 43)
InkWell( AddNewOrder( onTap: () {
onTap: () { addPrescriptionForm(
addPrescriptionForm( context, model, patient, model.prescriptionList);
context, model, patient, model.prescriptionList); },label: 'Apply for New Prescriptions Order',),
},
child: Container(
width: double.maxFinite,
height: 140,
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(10),
),
child: Center(
child: Container(
height: 90,
child: Column(
children: [
Container(
height: 40,
width: 40,
decoration: BoxDecoration(
color: Colors.grey[600],
borderRadius: BorderRadius.circular(10),
),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
),
),
SizedBox(
height: 10,
),
AppText(
'Apply for New Prescriptions Order',
color: Colors.grey[600],
fontWeight: FontWeight.w600,
)
],
),
),
),
),
),
...List.generate( ...List.generate(
model.prescriptionsList.length, model.prescriptionsList.length,
(index) => InkWell( (index) => InkWell(
@ -182,3 +141,4 @@ class PrescriptionsPage extends StatelessWidget {
)); ));
} }
} }

@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/reschedule-leaves/reschedule_leave.dart'; import 'package:doctor_app_flutter/screens/reschedule-leaves/reschedule_leave.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
@ -28,47 +29,12 @@ class AddRescheduleLeavScreen extends StatelessWidget {
appBarTitle: TranslationBase.of(context).rescheduleLeaves, appBarTitle: TranslationBase.of(context).rescheduleLeaves,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column(children: [ child: Column(children: [
Container( AddNewOrder( onTap: () {
width: MediaQuery.of(context).size.width, openLeave(
margin: EdgeInsets.all(10), context,
padding: false,
EdgeInsets.only(left: 10, right: 10, top: 20, bottom: 20), );
decoration: BoxDecoration( },label: TranslationBase.of(context).applyForReschedule,),
color: HexColor('#EAEAEA'),
borderRadius: BorderRadius.all(Radius.circular(20))),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.grey,
borderRadius: BorderRadius.circular(10)),
child: IconButton(
icon: Icon(
Icons.add,
size: 35,
color: Colors.white,
),
onPressed: () {
openLeave(
context,
false,
);
}),
),
Padding(
child: AppText(
TranslationBase.of(context).applyForReschedule,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 18,
color: HexColor('#7E7E7E')),
padding: EdgeInsets.all(10),
),
],
),
),
Column( Column(
children: model.getReschduleLeave children: model.getReschduleLeave
.map<Widget>((GetRescheduleLeavesResponse item) { .map<Widget>((GetRescheduleLeavesResponse item) {

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table_model.dart'; import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
@ -6,6 +7,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class MyScheduleWidget extends StatelessWidget { class MyScheduleWidget extends StatelessWidget {
final ListDoctorWorkingHoursTable workingHoursTable; final ListDoctorWorkingHoursTable workingHoursTable;
@ -14,6 +16,7 @@ class MyScheduleWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
List<WorkingHours> workingHours = Helpers.getWorkingHours( List<WorkingHours> workingHours = Helpers.getWorkingHours(
workingHoursTable.workingHours, workingHoursTable.workingHours,
); );
@ -30,7 +33,7 @@ class MyScheduleWidget extends StatelessWidget {
height: 10, height: 10,
), ),
AppText( AppText(
workingHoursTable.dayName, projectViewModel.isArabic?DateUtils.getWeekDayArabic(workingHoursTable.date.weekday): DateUtils.getWeekDay(workingHoursTable.date.weekday) ,
fontSize: 18, fontSize: 18,
fontFamily: 'Poppins', fontFamily: 'Poppins',
// fontSize: 18 // fontSize: 18
@ -71,6 +74,7 @@ class MyScheduleWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: workingHours.map((work) { children: workingHours.map((work) {
return Container( return Container(
margin: EdgeInsets.only(bottom:workingHours.length>1? 15:0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[

@ -0,0 +1,59 @@
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class AddNewOrder extends StatelessWidget {
const AddNewOrder({
Key key,
this.onTap, this.label,
}) : super(key: key);
final Function onTap;
final String label;
@override
Widget build(BuildContext context) {
return InkWell(
onTap: onTap,
child: Container(
width: double.maxFinite,
height: 140,
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(10),
),
child: Center(
child: Container(
height: 90,
child: Column(
children: [
Container(
height: 40,
width: 40,
decoration: BoxDecoration(
color: Colors.grey[600],
borderRadius: BorderRadius.circular(10),
),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
),
),
SizedBox(
height: 10,
),
AppText(
label ??'',
color: Colors.grey[600],
fontWeight: FontWeight.w600,
)
],
),
),
),
),
);
}
}

@ -62,8 +62,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: MEDICAL_FILE, route: MEDICAL_FILE,
nameLine1: TranslationBase.of(context).previewHealth, nameLine1: "Medical" ,//TranslationBase.of(context).medicalReport,
nameLine2: TranslationBase.of(context).summaryReport, nameLine2: "Report",//TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'), icon: 'patient/health_summary.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
@ -74,7 +74,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).lab, nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result, nameLine2: TranslationBase.of(context).result,
icon: 'patient/lab_results.png'), icon: 'patient/lab_results.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) // if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,

@ -51,8 +51,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: MEDICAL_FILE, route: MEDICAL_FILE,
nameLine1: TranslationBase.of(context).previewHealth, nameLine1: "Medical" ,//TranslationBase.of(context).medicalReport,
nameLine2: TranslationBase.of(context).summaryReport, nameLine2: "Report",//TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'), icon: 'patient/health_summary.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
@ -127,13 +127,31 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
nameLine1: TranslationBase.of(context).patientSick, nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave, nameLine2: TranslationBase.of(context).leave,
icon: 'patient/patient_sick_leave.png'), icon: 'patient/patient_sick_leave.png'),
// PatientProfileButton( if (patientType == "1")
// key: key, PatientProfileButton(
// patient: patient, key: key,
// route: PATIENT_ADMISSION_REQUEST, patient: patient,
// nameLine1: TranslationBase.of(context).admission, patientType: patientType,
// nameLine2: TranslationBase.of(context).request, arrivalType: arrivalType,
// icon: 'heartbeat.png'), route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'),
if (patientType == "1")
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_PATIENT_TO_DOCTOR,
// isDisable: patient.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'),
], ],
), ),
); );

@ -0,0 +1,34 @@
import 'package:flutter/material.dart';
import '../app_texts_widget.dart';
class ErrorMessage extends StatelessWidget {
const ErrorMessage({
Key key,
@required this.error,
}) : super(key: key);
final String error;
@override
Widget build(BuildContext context) {
return Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 100,),
Image.asset('assets/images/no-data.png'),
Center(
child: Center(
child: Padding(
padding: const EdgeInsets.only(top: 12, bottom: 12,right: 20, left: 30),
child: Center(child: AppText(error??'' , textAlign: TextAlign.center,)),
),
),
)
],
),
);
}
}

@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
import 'app_loader_widget.dart'; import 'app_loader_widget.dart';
import 'errors/dr_app_embedded_error.dart'; import 'errors/dr_app_embedded_error.dart';
import 'errors/error_message.dart';
class NetworkBaseView extends StatelessWidget { class NetworkBaseView extends StatelessWidget {
final BaseViewModel baseViewModel; final BaseViewModel baseViewModel;
@ -32,24 +33,7 @@ class NetworkBaseView extends StatelessWidget {
return AppLoaderWidget(); return AppLoaderWidget();
break; break;
case ViewState.Error: case ViewState.Error:
return Center( return ErrorMessage(error: baseViewModel.error ,);
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 100,),
Image.asset('assets/images/no-data.png'),
Center(
child: Center(
child: Padding(
padding: const EdgeInsets.only(top: 12, bottom: 12,right: 20, left: 30),
child: Center(child: AppText(baseViewModel.error??'' , textAlign: TextAlign.center,)),
),
),
)
],
),
);
break; break;
} }
} }

Loading…
Cancel
Save