|
|
|
|
@ -138,42 +138,6 @@ class PatientService extends BaseService {
|
|
|
|
|
return Future.value(localRes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future getPatientVitalSign(patient) async {
|
|
|
|
|
hasError = false;
|
|
|
|
|
await baseAppClient.post(
|
|
|
|
|
GET_PATIENT_VITAL_SIGN,
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
_patientVitalSignList = [];
|
|
|
|
|
response['List_DoctorPatientVitalSign'].forEach((v) {
|
|
|
|
|
_patientVitalSignList.add(new VitalSignResModel.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (_patientVitalSignList.length > 0) {
|
|
|
|
|
List<VitalSignResModel> patientVitalSignOrderdSubListTemp = [];
|
|
|
|
|
patientVitalSignOrderdSubListTemp = _patientVitalSignList;
|
|
|
|
|
patientVitalSignOrderdSubListTemp
|
|
|
|
|
.sort((VitalSignResModel a, VitalSignResModel b) {
|
|
|
|
|
return b.vitalSignDate.microsecondsSinceEpoch -
|
|
|
|
|
a.vitalSignDate.microsecondsSinceEpoch;
|
|
|
|
|
});
|
|
|
|
|
patientVitalSignOrderdSubList.clear();
|
|
|
|
|
int length = patientVitalSignOrderdSubListTemp.length >= 20
|
|
|
|
|
? 20
|
|
|
|
|
: patientVitalSignOrderdSubListTemp.length;
|
|
|
|
|
for (int x = 0; x < length; x++) {
|
|
|
|
|
patientVitalSignOrderdSubList
|
|
|
|
|
.add(patientVitalSignOrderdSubListTemp[x]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
hasError = true;
|
|
|
|
|
super.error = error;
|
|
|
|
|
},
|
|
|
|
|
body: patient,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future getLabResultOrders(patient) async {
|
|
|
|
|
hasError = false;
|
|
|
|
|
await baseAppClient.post(
|
|
|
|
|
|