hot fixes

merge-requests/551/head
hussam al-habibeh 5 years ago
parent b1951296cd
commit 1d09bcf251

@ -40,7 +40,7 @@ class _InsuranceApprovalScreenNewState
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: patientType == "1" onModelReady: patient.admissionNo != null
? (model) => model.getInsuranceInPatient(mrn: patient.patientId) ? (model) => model.getInsuranceInPatient(mrn: patient.patientId)
: patient.appointmentNo != null : patient.appointmentNo != null
? (model) => model.getInsuranceApproval(patient, ? (model) => model.getInsuranceApproval(patient,
@ -54,7 +54,7 @@ class _InsuranceApprovalScreenNewState
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
appBarTitle: TranslationBase.of(context).approvals, appBarTitle: TranslationBase.of(context).approvals,
body: patientType == "1" body: patient.admissionNo != null
? SingleChildScrollView( ? SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(

@ -43,7 +43,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: (model) => model.insuranceApprovalInPatient.length == 0 onModelReady: (model) => model.insuranceApprovalInPatient.length == 0
? patientType == "1" ? patient.admissionNo != null
? (model) => model.getInsuranceInPatient(mrn: patient.patientId) ? (model) => model.getInsuranceInPatient(mrn: patient.patientId)
: patient.appointmentNo != null : patient.appointmentNo != null
? (model) => model.getInsuranceApproval(patient, ? (model) => model.getInsuranceApproval(patient,
@ -57,7 +57,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
baseViewModel: model, baseViewModel: model,
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString(), patient.arrivedOn), patient, patient.patientType.toString(), patient.arrivedOn),
body: patientType == "1" body: patient.admissionNo != null
? SingleChildScrollView( ? SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(

@ -30,7 +30,8 @@ class RadiologyHomePage extends StatelessWidget {
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getPatientRadOrders(patient,patientType: patientType), onModelReady: (model) =>
model.getPatientRadOrders(patient, patientType: patientType),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
@ -46,27 +47,29 @@ class RadiologyHomePage extends StatelessWidget {
SizedBox( SizedBox(
height: 12, height: 12,
), ),
if(model.radiologyList.isNotEmpty && patient.patientStatusType != 43) if (model.radiologyList.isNotEmpty &&
patient.patientStatusType != 43)
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
'Radiology', 'Radiology',
style: "caption2", style: "caption2",
color: Colors.black, color: Colors.black,
fontSize: 13, fontSize: 13,
), ),
AppText( AppText(
'Result', 'Result',
bold: true, bold: true,
fontSize: 22, fontSize: 22,
), ),
], ],
),
), ),
), if (patient.patientStatusType != null &&
if(patient.patientStatusType == 43) patient.patientStatusType == 43)
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
@ -86,19 +89,21 @@ class RadiologyHomePage extends StatelessWidget {
], ],
), ),
), ),
if (patientType != null && if (patient.patientStatusType != null &&
patientType == '7' &&
patient.patientStatusType == 43) patient.patientStatusType == 43)
AddNewOrder( onTap: () { AddNewOrder(
Navigator.push( onTap: () {
context, Navigator.push(
MaterialPageRoute( context,
builder: (context) => AddSelectedRadiologyOrder( MaterialPageRoute(
patient: patient, builder: (context) => AddSelectedRadiologyOrder(
model: model, patient: patient,
)), model: model,
); )),
},label: 'Apply for Radiology Order',), );
},
label: 'Apply for Radiology Order',
),
...List.generate( ...List.generate(
model.radiologyList.length, model.radiologyList.length,
(index) => InkWell( (index) => InkWell(
@ -111,27 +116,31 @@ 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 ?? model.radiologyList[index].reportData, appointmentDate:
), model.radiologyList[index].orderDate ??
)), model.radiologyList[index].reportData,
if(model.radiologyList.isEmpty && patient.patientStatusType != 43) ),
)),
if (model.radiologyList.isEmpty &&
patient.patientStatusType != 43)
Center( Center(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox(height: 100,), SizedBox(
height: 100,
),
Image.asset('assets/images/no-data.png'), Image.asset('assets/images/no-data.png'),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: AppText('No Radiology Found'), child: AppText('No Radiology Found'),
) )
], ],
), ),
) )

@ -31,16 +31,17 @@ class PrescriptionsPage extends StatelessWidget {
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PrescriptionViewModel>( return BaseView<PrescriptionViewModel>(
onModelReady: (model) => patientType == "1" onModelReady: (model) =>
? model.getPrescriptionsInPatient(patient) patient.admissionNo != null && patient.admissionNo != "0"
: model.getPrescriptions(patient, patientType: patientType), ? model.getPrescriptionsInPatient(patient)
: model.getPrescriptions(patient, patientType: patientType),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType ?? '0', arrivalType), patient, patientType ?? '0', arrivalType),
body: patientType != "1" body: patient.admissionNo == null
? FractionallySizedBox( ? FractionallySizedBox(
widthFactor: 1.0, widthFactor: 1.0,
child: ListView( child: ListView(
@ -70,7 +71,8 @@ class PrescriptionsPage extends StatelessWidget {
], ],
), ),
), ),
if (patient.patientStatusType == 43) if (patient.patientStatusType != null &&
patient.patientStatusType == 43)
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
@ -90,8 +92,7 @@ class PrescriptionsPage extends StatelessWidget {
], ],
), ),
), ),
if (patientType != null && if (patient.patientStatusType != null &&
patientType == '7' &&
patient.patientStatusType == 43) patient.patientStatusType == 43)
AddNewOrder( AddNewOrder(
onTap: () { onTap: () {
@ -211,7 +212,8 @@ class PrescriptionsPage extends StatelessWidget {
Image.asset('assets/images/no-data.png'), Image.asset('assets/images/no-data.png'),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: AppText('No Prescriptions Found'), child: AppText(
'No Prescriptions Found In Patentiss'),
) )
], ],
), ),

@ -69,7 +69,8 @@ class ProcedureScreen extends StatelessWidget {
], ],
), ),
), ),
if (patient.patientStatusType == 43) if (patient.patientStatusType != null &&
patient.patientStatusType == 43)
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
@ -89,8 +90,7 @@ class ProcedureScreen extends StatelessWidget {
], ],
), ),
), ),
if (patientType != null && if (patient.patientStatusType != null &&
patientType == '7' &&
patient.patientStatusType == 43) patient.patientStatusType == 43)
InkWell( InkWell(
onTap: () { onTap: () {

@ -96,8 +96,8 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: ORDER_NOTE, route: ORDER_NOTE,
nameLine1:"Order", //"Text", nameLine1: "Order", //"Text",
nameLine2: "Sheet",//TranslationBase.of(context).orders, nameLine2: "Sheet", //TranslationBase.of(context).orders,
icon: 'patient/Progress_notes.png'), icon: 'patient/Progress_notes.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
@ -126,9 +126,9 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
arrivalType: arrivalType, arrivalType: arrivalType,
isDisable: true, isDisable: true,
route: MEDICAL_FILE, route: MEDICAL_FILE,
nameLine1: "Medical",//Health nameLine1: "Medical", //Health
//TranslationBase.of(context).medicalReport, //TranslationBase.of(context).medicalReport,
nameLine2: "Report",//Report nameLine2: "Report", //Report
//TranslationBase.of(context).summaryReport, //TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'), icon: 'patient/health_summary.png'),
PatientProfileButton( PatientProfileButton(

@ -51,8 +51,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: MEDICAL_FILE, route: MEDICAL_FILE,
nameLine1: "Health" ,//TranslationBase.of(context).medicalReport, nameLine1: "Health", //TranslationBase.of(context).medicalReport,
nameLine2: "Summary",//TranslationBase.of(context).summaryReport, nameLine2: "Summary", //TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'), icon: 'patient/health_summary.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
@ -127,7 +127,7 @@ 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'),
if (patient.admissionNo!=null && patient.admissionNo!="0") if (patient.admissionNo != null && patient.admissionNo != "0")
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -137,32 +137,27 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
nameLine1: TranslationBase.of(context).progress, nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note, nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'), icon: 'patient/Progress_notes.png'),
if (patient.admissionNo != null && patient.admissionNo != "0")
if (patient.admissionNo!=null && patient.admissionNo!="0")
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: ORDER_NOTE, route: ORDER_NOTE,
nameLine1:"Order", //"Text", nameLine1: "Order", //"Text",
nameLine2: "Sheet", nameLine2: "Sheet",
icon: 'patient/Progress_notes.png'), icon: 'patient/Progress_notes.png'),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
if (patient.appointmentNo!=null && patient.appointmentNo!=0) PatientProfileButton(
PatientProfileButton( key: key,
key: key, patient: patient,
patient: patient, patientType: patientType,
patientType: patientType, arrivalType: arrivalType,
arrivalType: arrivalType, route: REFER_PATIENT_TO_DOCTOR,
route: REFER_PATIENT_TO_DOCTOR, // isDisable: patient.patientStatusType != 43 ? true : false,
// isDisable: patient.patientStatusType != 43 ? true : false, nameLine1: TranslationBase.of(context).referral,
nameLine1: TranslationBase.of(context).referral, nameLine2: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).patient, icon: 'patient/refer_patient.png'),
icon: 'patient/refer_patient.png'),
], ],
), ),
); );

Loading…
Cancel
Save