|
|
|
|
@ -24,9 +24,17 @@ class VitalSignService extends BaseService {
|
|
|
|
|
response['List_DoctorPatientVitalSign'].forEach((vital) {
|
|
|
|
|
vitalSignResModelList.add(VitalSignResModel.fromJson(vital));
|
|
|
|
|
});
|
|
|
|
|
bool isHaveWeight = false;
|
|
|
|
|
bool isHaveHeight = false;
|
|
|
|
|
vitalSignResModelList.forEach((element) {
|
|
|
|
|
weightKg = '${element.weightKg}';
|
|
|
|
|
heightCm = '${element.heightCm}';
|
|
|
|
|
if (element.weightKg != 0 && !isHaveWeight) {
|
|
|
|
|
weightKg = '${element.weightKg}';
|
|
|
|
|
isHaveWeight = true;
|
|
|
|
|
}
|
|
|
|
|
if (element.heightCm != 0 && !isHaveHeight) {
|
|
|
|
|
heightCm = '${element.heightCm}';
|
|
|
|
|
isHaveHeight = true;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}, onFailure: (String error, int statusCode) {
|
|
|
|
|
hasError = true;
|
|
|
|
|
|