Merge branch 'release-hot-fix' into 'development'

Release hot fix

See merge request Cloud_Solution/doctor_app_flutter!552
merge-requests/553/merge
Mohammad Aljammal 5 years ago
commit 2a16264d83

@ -13,21 +13,21 @@ class LabsService extends BaseService {
List<PatientLabOrders> patientLabOrdersList = List(); List<PatientLabOrders> patientLabOrdersList = List();
Future getPatientLabOrdersList( Future getPatientLabOrdersList(
PatiantInformtion patient, bool isArrived) async { PatiantInformtion patient, bool isInpatient) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
String url = ""; String url = "";
if (isArrived) { if (isInpatient) {
url = GET_PATIENT_LAB_OREDERS;
} else {
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
url = GET_Patient_LAB_ORDERS; url = GET_Patient_LAB_ORDERS;
} else {
url = GET_PATIENT_LAB_OREDERS;
} }
await baseAppClient.postPatient(url, patient: patient, await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
patientLabOrdersList.clear(); patientLabOrdersList.clear();
if (isArrived) { if (!isInpatient) {
response['ListPLO'].forEach((hospital) { response['ListPLO'].forEach((hospital) {
patientLabOrdersList.add(PatientLabOrders.fromJson(hospital)); patientLabOrdersList.add(PatientLabOrders.fromJson(hospital));
}); });

@ -227,14 +227,11 @@ class ProcedureViewModel extends BaseViewModel {
return labResultLists; return labResultLists;
} }
void getLabs(PatiantInformtion patient,{bool isArrived}) async { void getLabs(PatiantInformtion patient, {bool isInpatient = false}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getPatientLabOrdersList(patient, isArrived); await _labsService.getPatientLabOrdersList(patient, isInpatient);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
if(isArrived)
setState(ViewState.ErrorLocal);
else
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
_labsService.patientLabOrdersList.forEach((element) { _labsService.patientLabOrdersList.forEach((element) {

@ -642,6 +642,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
.getTo, .getTo,
"isSearch": "isSearch":
isSearch, isSearch,
"isInpatient":
isInpatient,
"arrivalType": "arrivalType":
arrivalType, arrivalType,
"isInpatient":isInpatient "isInpatient":isInpatient

@ -29,9 +29,10 @@ class LabsHomePage extends StatelessWidget {
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
patientType = routeArgs['patientType']; patientType = routeArgs['patientType'];
arrivalType = routeArgs['arrivalType']; arrivalType = routeArgs['arrivalType'];
bool isInpatient = routeArgs['isInpatient'];
print(arrivalType); print(arrivalType);
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getLabs(patient,isArrived: ( patient.patientStatusType == 43)), onModelReady: (model) => model.getLabs(patient, isInpatient: isInpatient),
builder: (context, ProcedureViewModel model, widget) => AppScaffold( builder: (context, ProcedureViewModel model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],

@ -40,6 +40,8 @@ class PatientProfileScreen extends StatelessWidget {
String to = routeArgs['to']; String to = routeArgs['to'];
if (routeArgs.containsKey("isSearch")) { if (routeArgs.containsKey("isSearch")) {
isFromSearch = routeArgs['isSearch']; isFromSearch = routeArgs['isSearch'];
}
if (routeArgs.containsKey("isInpatient")) {
isInpatient = routeArgs['isInpatient']; isInpatient = routeArgs['isInpatient'];
} }
@ -67,26 +69,23 @@ class PatientProfileScreen extends StatelessWidget {
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
isFromSearch isInpatient
? ProfileMedicalInfoWidgetSearch( ? ProfileMedicalInfoWidgetInPatient(
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
from: from, from: from,
to: to, to: to,
isInpatient:false isInpatient:isInpatient,
// isFromSearch:isFromSearch
) )
: isInpatient : isFromSearch
? ProfileMedicalInfoWidgetInPatient( ? ProfileMedicalInfoWidgetSearch(
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
from: from, from: from,
to: to, to: to,
isInpatient:isInpatient, isInpatient:false
) )
: ProfileMedicalInfoWidget( : ProfileMedicalInfoWidget(
patient: patient, patient: patient,
@ -104,7 +103,8 @@ class PatientProfileScreen extends StatelessWidget {
], ],
), ),
), ),
if (patient.patientStatusType !=null && patient.patientStatusType == 43 ) if (patient.patientStatusType != null &&
patient.patientStatusType == 43)
BaseView<SOAPViewModel>( BaseView<SOAPViewModel>(
onModelReady: (model) async {}, onModelReady: (model) async {},
builder: (_, model, w) => Positioned( builder: (_, model, w) => Positioned(

@ -30,12 +30,13 @@ class VitalSignDetailsScreen extends StatelessWidget {
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
String from = routeArgs['from']; String from = routeArgs['from'];
String to = routeArgs['to']; String to = routeArgs['to'];
bool isInpatient = routeArgs['isInpatient'];
String imageBasePath = 'assets/images/'; String imageBasePath = 'assets/images/';
String assetBasePath = "${imageBasePath}patient/vital_signs/"; String assetBasePath = "${imageBasePath}patient/vital_signs/";
return BaseView<VitalSignsViewModel>( return BaseView<VitalSignsViewModel>(
onModelReady: (model) => onModelReady: (model) =>
model.getPatientVitalSignHistory(patient, from, to, patientType == "1"), model.getPatientVitalSignHistory(patient, from, to, isInpatient),
builder: (_, mode, widget) => AppScaffold( builder: (_, mode, widget) => AppScaffold(
baseViewModel: mode, baseViewModel: mode,
isShowAppBar: true, isShowAppBar: true,

@ -13,12 +13,12 @@ class PatientProfileButton extends StatelessWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType; final String patientType;
String arrivalType; String arrivalType;
final bool isInPatient;
String from; String from;
String to; String to;
final String url = "assets/images/"; final String url = "assets/images/";
final bool isDisable; final bool isDisable;
final bool isLoading; final bool isLoading;
final bool isInpatient;
final Function onTap; final Function onTap;
PatientProfileButton( PatientProfileButton(
@ -34,7 +34,9 @@ class PatientProfileButton extends StatelessWidget {
this.onTap, this.onTap,
this.isLoading = false, this.isLoading = false,
this.from, this.from,
this.to, this.isInpatient}) this.to,
this.isInPatient = false,
})
: super(key: key); : super(key: key);
@override @override
@ -129,7 +131,7 @@ class PatientProfileButton extends StatelessWidget {
'to': to, 'to': to,
'patientType': patientType, 'patientType': patientType,
'arrivalType': arrivalType, 'arrivalType': arrivalType,
'isInpatient':isInpatient 'isInpatient': isInPatient,
}); });
} }
} }

@ -44,7 +44,6 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
childAspectRatio: 1 / 1.0, childAspectRatio: 1 / 1.0,
crossAxisCount: 3, crossAxisCount: 3,
children: [ children: [
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -81,7 +80,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
isInpatient:isInpatient, isInPatient:isInpatient,
route: RADIOLOGY_PATIENT, route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology, nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service, nameLine2: TranslationBase.of(context).service,
@ -134,7 +133,7 @@ class ProfileMedicalInfoWidget 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 (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (patient.appointmentNo!=null && patient.appointmentNo!=0)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -145,7 +144,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).patient, nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf, nameLine2: TranslationBase.of(context).ucaf,
icon: 'patient/ucaf.png'), icon: 'patient/ucaf.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (patient.appointmentNo!=null && patient.appointmentNo!=0)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -156,7 +155,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
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'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (patient.appointmentNo!=null && patient.appointmentNo!=0)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,

@ -56,6 +56,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
nameLine1: TranslationBase.of(context).vital, nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs, nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS, route: VITAL_SIGN_DETAILS,
isInPatient: true,
icon: 'patient/vital_signs.png'), icon: 'patient/vital_signs.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
@ -63,6 +64,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: LAB_RESULT, route: LAB_RESULT,
isInPatient: true,
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'),
@ -71,7 +73,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
isInpatient: isInpatient, isInPatient: isInpatient,
route: RADIOLOGY_PATIENT, route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology, nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).result, nameLine2: TranslationBase.of(context).result,
@ -141,6 +143,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: REFER_IN_PATIENT_TO_DOCTOR, route: REFER_IN_PATIENT_TO_DOCTOR,
isInPatient: true,
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'),

@ -69,7 +69,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
isInpatient:isInpatient, isInPatient:isInpatient,
route: RADIOLOGY_PATIENT, route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology, nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service, nameLine2: TranslationBase.of(context).service,

Loading…
Cancel
Save