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

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

@ -30,7 +30,8 @@ class RadiologyHomePage extends StatelessWidget {
String arrivalType = routeArgs['arrivalType'];
return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getPatientRadOrders(patient,patientType: patientType),
onModelReady: (model) =>
model.getPatientRadOrders(patient, patientType: patientType),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
backgroundColor: Colors.grey[100],
@ -46,7 +47,8 @@ class RadiologyHomePage extends StatelessWidget {
SizedBox(
height: 12,
),
if(model.radiologyList.isNotEmpty && patient.patientStatusType != 43)
if (model.radiologyList.isNotEmpty &&
patient.patientStatusType != 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
@ -66,7 +68,8 @@ class RadiologyHomePage extends StatelessWidget {
],
),
),
if(patient.patientStatusType == 43)
if (patient.patientStatusType != null &&
patient.patientStatusType == 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
@ -86,10 +89,10 @@ class RadiologyHomePage extends StatelessWidget {
],
),
),
if (patientType != null &&
patientType == '7' &&
if (patient.patientStatusType != null &&
patient.patientStatusType == 43)
AddNewOrder( onTap: () {
AddNewOrder(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
@ -98,7 +101,9 @@ class RadiologyHomePage extends StatelessWidget {
model: model,
)),
);
},label: 'Apply for Radiology Order',),
},
label: 'Apply for Radiology Order',
),
...List.generate(
model.radiologyList.length,
(index) => InkWell(
@ -117,21 +122,25 @@ class RadiologyHomePage extends StatelessWidget {
invoiceNO: '${model.radiologyList[index].invoiceNo}',
branch: '${model.radiologyList[index].projectName}',
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(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 100,),
SizedBox(
height: 100,
),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText('No Radiology Found'),
)
],
),
)

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

@ -137,7 +137,6 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'),
if (patient.admissionNo != null && patient.admissionNo != "0")
PatientProfileButton(
key: key,
@ -148,7 +147,6 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
nameLine1: "Order", //"Text",
nameLine2: "Sheet",
icon: 'patient/Progress_notes.png'),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileButton(
key: key,
@ -160,9 +158,6 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'),
],
),
);

Loading…
Cancel
Save