hot fixes

merge-requests/547/head
Mohammad Aljammal 5 years ago
parent 9e8aef0835
commit 0ded3a5a03

@ -175,25 +175,25 @@ class PatiantInformtion {
startTime: json["startTime"],
appointmentNo: json['appointmentNo'] ?? json['AppointmentNo'],
appointmentType: json['appointmentType'],
appointmentTypeId: json['appointmentTypeId'],
appointmentTypeId: json['appointmentTypeId']?? json['appointmentTypeid'],
arrivedOn: json['arrivedOn'],
clinicGroupId: json['clinicGroupId'],
companyName: json['companyName'],
dischargeStatus: json['dischargeStatus'],
doctorDetails: json['doctorDetails'],
endTime: json['endTime'],
episodeNo: json['episodeNo'] ?? json['EpisodeID'],
episodeNo: json['episodeNo'] ?? json['EpisodeID'] ?? json['EpisodeNo'],
fallRiskScore: json['fallRiskScore'],
isSigned: json['isSigned'],
medicationOrders: json['medicationOrders'],
nationality: json['nationality'] ?? json['NationalityNameN'],
patientMRN: json['patientMRN'] ?? json['PatientMRN'],
visitType: json['visitType'] ?? json['visitType'],
visitType: json['visitType'] ?? json['visitType']?? json['visitType'],
nationalityFlagURL:
json['NationalityFlagURL'] ?? json['NationalityFlagURL'],
patientStatusType:
json['patientStatusType'] ?? json['patientStatusType'],
visitTypeId: json['visitTypeId'] ?? json['visitTypeId'],
json['patientStatusType'] ?? json['PatientStatusType'],
visitTypeId: json['visitTypeId'] ?? json['visitTypeId'] ?? json['visitTypeid'],
startTimes: json['StartTime'] ?? json['StartTime'],
);
}

@ -31,7 +31,7 @@ class LabsHomePage extends StatelessWidget {
arrivalType = routeArgs['arrivalType'];
print(arrivalType);
return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getLabs(patient,isArrived: (patientType != null && patientType == '7' && patient.patientStatusType == 43)),
onModelReady: (model) => model.getLabs(patient,isArrived: ( patient.patientStatusType == 43)),
builder: (context, ProcedureViewModel model, widget) => AppScaffold(
baseViewModel: model,
backgroundColor: Colors.grey[100],

@ -65,34 +65,24 @@ class PatientProfileScreen extends StatelessWidget {
IsLoginForDoctorApp: true,
PatientOutSA: false);
if(patient.patientType ==1 || patient.admissionNo==null || patient.admissionNo =="0" ) {
patientViewModel.getPatientList(patientReq, "1", isBusyLocal: false).then((response) {
if (patientType == "1" &&
(patient.admissionNo == null ||
patient.admissionNo == "0")) {
patientViewModel
.getPatientList(patientReq, "1", isBusyLocal: false)
.then((response) {
if (response['MessageStatus'] == 1) {
if (response['List_MyInPatient'] != null) {
List<PatiantInformtion> patientList =
ModelResponse.fromJson(response['List_MyInPatient'])
.list;
List<PatiantInformtion> patientList = ModelResponse.fromJson(response['List_MyInPatient']).list;
patient.admissionNo = patientList[0].admissionNo;
patient.admissionDate = patientList[0].admissionDate;
} else {
DrAppToastMsg.showErrorToast('No patient');
}
}
}).catchError((error) {
// setState(() {
// isLoading = false;
// });
Helpers.showErrorToast(error.message);
//DrAppToastMsg.showErrorToast(error);
print(error);
});
}
},
builder: (_, patientViewModel, w) => AppScaffold(
@ -149,11 +139,9 @@ class PatientProfileScreen extends StatelessWidget {
],
),
),
if (int.parse(patientType) == 7 ||
int.parse(patientType) == 6)
if (patient.patientStatusType !=null && patient.patientStatusType == 43 )
BaseView<SOAPViewModel>(
onModelReady: (model) async {
},
onModelReady: (model) async {},
builder: (_, model, w) => Positioned(
top: 175,
left: 20,
@ -181,19 +169,25 @@ class PatientProfileScreen extends StatelessWidget {
),
onPressed: () async {
if (patient.patientStatusType == 43) {
PostEpisodeReqModel postEpisodeReqModel =
PostEpisodeReqModel
postEpisodeReqModel =
PostEpisodeReqModel(
appointmentNo:
patient.appointmentNo,
patientMRN: patient.patientMRN);
GifLoaderDialogUtils.showMyDialog(context);
await model
.postEpisode(postEpisodeReqModel);
GifLoaderDialogUtils.hideDialog(context);
patientMRN:
patient.patientMRN);
GifLoaderDialogUtils.showMyDialog(
context);
await model.postEpisode(
postEpisodeReqModel);
GifLoaderDialogUtils.hideDialog(
context);
patient.episodeNo = model.episodeID;
Navigator.of(context).pushNamed(
CREATE_EPISODE,
arguments: {'patient': patient});
arguments: {
'patient': patient
});
}
},
),
@ -216,10 +210,13 @@ class PatientProfileScreen extends StatelessWidget {
height: 30,
),
onPressed: () {
if (patient.patientStatusType == 43) {
if (patient.patientStatusType ==
43) {
Navigator.of(context).pushNamed(
UPDATE_EPISODE,
arguments: {'patient': patient});
arguments: {
'patient': patient
});
}
}),
],
@ -254,4 +251,3 @@ class AvatarWidget extends StatelessWidget {
);
}
}

Loading…
Cancel
Save