|
|
@ -19,8 +19,7 @@ class BloodSugarService extends BaseService {
|
|
|
|
hasError = false;
|
|
|
|
hasError = false;
|
|
|
|
Map<String, dynamic> body = Map();
|
|
|
|
Map<String, dynamic> body = Map();
|
|
|
|
body['isDentalAllowedBackend'] = false;
|
|
|
|
body['isDentalAllowedBackend'] = false;
|
|
|
|
await baseAppClient.post(GET_DIABETIC_RESULT_AVERAGE,
|
|
|
|
await baseAppClient.post(GET_DIABETIC_RESULT_AVERAGE, onSuccess: (dynamic response, int statusCode) {
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
|
|
|
monthDiabtectResultAverageList.clear();
|
|
|
|
monthDiabtectResultAverageList.clear();
|
|
|
|
weekDiabtectResultAverageList.clear();
|
|
|
|
weekDiabtectResultAverageList.clear();
|
|
|
|
yearDiabtecResultAverageList.clear();
|
|
|
|
yearDiabtecResultAverageList.clear();
|
|
|
@ -30,18 +29,15 @@ class BloodSugarService extends BaseService {
|
|
|
|
yearDiabtecPatientResult.clear();
|
|
|
|
yearDiabtecPatientResult.clear();
|
|
|
|
|
|
|
|
|
|
|
|
response['List_MonthDiabtectResultAverage'].forEach((item) {
|
|
|
|
response['List_MonthDiabtectResultAverage'].forEach((item) {
|
|
|
|
monthDiabtectResultAverageList
|
|
|
|
monthDiabtectResultAverageList.add(MonthDiabtectResultAverage.fromJson(item));
|
|
|
|
.add(MonthDiabtectResultAverage.fromJson(item));
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
response['List_WeekDiabtectResultAverage'].forEach((item) {
|
|
|
|
response['List_WeekDiabtectResultAverage'].forEach((item) {
|
|
|
|
weekDiabtectResultAverageList
|
|
|
|
weekDiabtectResultAverageList.add(WeekDiabtectResultAverage.fromJson(item));
|
|
|
|
.add(WeekDiabtectResultAverage.fromJson(item));
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
response['List_YearDiabtecResultAverage'].forEach((item) {
|
|
|
|
response['List_YearDiabtecResultAverage'].forEach((item) {
|
|
|
|
yearDiabtecResultAverageList
|
|
|
|
yearDiabtecResultAverageList.add(YearDiabtecResultAverage.fromJson(item));
|
|
|
|
.add(YearDiabtecResultAverage.fromJson(item));
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}, onFailure: (String error, int statusCode) {
|
|
|
|
}, onFailure: (String error, int statusCode) {
|
|
|
|
hasError = true;
|
|
|
|
hasError = true;
|
|
|
@ -51,8 +47,7 @@ class BloodSugarService extends BaseService {
|
|
|
|
|
|
|
|
|
|
|
|
Future getDiabtecResults() async {
|
|
|
|
Future getDiabtecResults() async {
|
|
|
|
hasError = false;
|
|
|
|
hasError = false;
|
|
|
|
await baseAppClient.post(GET_DIABTEC_RESULT,
|
|
|
|
await baseAppClient.post(GET_DIABTEC_RESULT, onSuccess: (dynamic response, int statusCode) {
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
|
|
|
monthDiabtecPatientResult.clear();
|
|
|
|
monthDiabtecPatientResult.clear();
|
|
|
|
weekDiabtecPatientResult.clear();
|
|
|
|
weekDiabtecPatientResult.clear();
|
|
|
|
yearDiabtecPatientResult.clear();
|
|
|
|
yearDiabtecPatientResult.clear();
|
|
|
@ -69,7 +64,6 @@ class BloodSugarService extends BaseService {
|
|
|
|
yearDiabtecPatientResult.add(DiabtecPatientResult.fromJson(item));
|
|
|
|
yearDiabtecPatientResult.add(DiabtecPatientResult.fromJson(item));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}, onFailure: (String error, int statusCode) {
|
|
|
|
}, onFailure: (String error, int statusCode) {
|
|
|
|
hasError = true;
|
|
|
|
|
|
|
|
super.error = error;
|
|
|
|
super.error = error;
|
|
|
|
}, body: Map());
|
|
|
|
}, body: Map());
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -81,17 +75,15 @@ class BloodSugarService extends BaseService {
|
|
|
|
body['BloodSugerDateChart'] = bloodSugerDateChart;
|
|
|
|
body['BloodSugerDateChart'] = bloodSugerDateChart;
|
|
|
|
body['BloodSugerResult'] = bloodSugerResult;
|
|
|
|
body['BloodSugerResult'] = bloodSugerResult;
|
|
|
|
body['DiabtecUnit'] = diabtecUnit;
|
|
|
|
body['DiabtecUnit'] = diabtecUnit;
|
|
|
|
body['MeasuredTime'] = measuredTime+1;
|
|
|
|
body['MeasuredTime'] = measuredTime + 1;
|
|
|
|
body['isDentalAllowedBackend'] = false;
|
|
|
|
body['isDentalAllowedBackend'] = false;
|
|
|
|
await baseAppClient.post(ADD_DIABTEC_RESULT,
|
|
|
|
await baseAppClient.post(ADD_DIABTEC_RESULT, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) {
|
|
|
|
onSuccess: (response, statusCode) async {},
|
|
|
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
|
|
|
hasError = true;
|
|
|
|
hasError = true;
|
|
|
|
super.error = error;
|
|
|
|
super.error = error;
|
|
|
|
}, body: body);
|
|
|
|
}, body: body);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
updateDiabtecResult({DateTime month,DateTime hour,String bloodSugerResult,String diabtecUnit, int measuredTime,int lineItemNo}) async {
|
|
|
|
updateDiabtecResult({DateTime month, DateTime hour, String bloodSugerResult, String diabtecUnit, int measuredTime, int lineItemNo}) async {
|
|
|
|
hasError = false;
|
|
|
|
hasError = false;
|
|
|
|
super.error = "";
|
|
|
|
super.error = "";
|
|
|
|
Map<String, dynamic> body = Map();
|
|
|
|
Map<String, dynamic> body = Map();
|
|
|
@ -99,11 +91,9 @@ class BloodSugarService extends BaseService {
|
|
|
|
body['DiabtecUnit'] = diabtecUnit;
|
|
|
|
body['DiabtecUnit'] = diabtecUnit;
|
|
|
|
body['BloodSugerDateChart'] = '${month.year}-${month.month}-${month.day} ${hour.hour}:${hour.minute}:00';
|
|
|
|
body['BloodSugerDateChart'] = '${month.year}-${month.month}-${month.day} ${hour.hour}:${hour.minute}:00';
|
|
|
|
body['isDentalAllowedBackend'] = false;
|
|
|
|
body['isDentalAllowedBackend'] = false;
|
|
|
|
body['MeasuredTime'] = measuredTime+1;
|
|
|
|
body['MeasuredTime'] = measuredTime + 1;
|
|
|
|
body['LineItemNo'] = lineItemNo;
|
|
|
|
body['LineItemNo'] = lineItemNo;
|
|
|
|
await baseAppClient.post(UPDATE_DIABETIC_RESULT,
|
|
|
|
await baseAppClient.post(UPDATE_DIABETIC_RESULT, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) {
|
|
|
|
onSuccess: (response, statusCode) async {},
|
|
|
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
|
|
|
hasError = true;
|
|
|
|
hasError = true;
|
|
|
|
super.error = error;
|
|
|
|
super.error = error;
|
|
|
|
}, body: body);
|
|
|
|
}, body: body);
|
|
|
@ -115,23 +105,19 @@ class BloodSugarService extends BaseService {
|
|
|
|
Map<String, dynamic> body = Map();
|
|
|
|
Map<String, dynamic> body = Map();
|
|
|
|
body['isDentalAllowedBackend'] = false;
|
|
|
|
body['isDentalAllowedBackend'] = false;
|
|
|
|
body['To'] = user.emailAddress;
|
|
|
|
body['To'] = user.emailAddress;
|
|
|
|
await baseAppClient.post(SEND_AVERAGE_BLOOD_SUGAR_REPORT,
|
|
|
|
await baseAppClient.post(SEND_AVERAGE_BLOOD_SUGAR_REPORT, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) {
|
|
|
|
onSuccess: (response, statusCode) async {},
|
|
|
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
|
|
|
hasError = true;
|
|
|
|
hasError = true;
|
|
|
|
super.error = error;
|
|
|
|
super.error = error;
|
|
|
|
}, body: body);
|
|
|
|
}, body: body);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Future deactivateDiabeticStatus({int lineItemNo }) async {
|
|
|
|
Future deactivateDiabeticStatus({int lineItemNo}) async {
|
|
|
|
hasError = false;
|
|
|
|
hasError = false;
|
|
|
|
super.error = "";
|
|
|
|
super.error = "";
|
|
|
|
Map<String, dynamic> body = Map();
|
|
|
|
Map<String, dynamic> body = Map();
|
|
|
|
body['isDentalAllowedBackend'] = false;
|
|
|
|
body['isDentalAllowedBackend'] = false;
|
|
|
|
body['LineItemNo'] =lineItemNo;
|
|
|
|
body['LineItemNo'] = lineItemNo;
|
|
|
|
await baseAppClient.post(DEACTIVATE_DIABETIC_STATUS,
|
|
|
|
await baseAppClient.post(DEACTIVATE_DIABETIC_STATUS, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) {
|
|
|
|
onSuccess: (response, statusCode) async {},
|
|
|
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
|
|
|
hasError = true;
|
|
|
|
hasError = true;
|
|
|
|
super.error = error;
|
|
|
|
super.error = error;
|
|
|
|
}, body: body);
|
|
|
|
}, body: body);
|
|
|
|