You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.9 KiB
Dart
69 lines
2.9 KiB
Dart
import 'package:diplomaticquarterapp/config/config.dart';
|
|
import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart';
|
|
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
|
import 'package:diplomaticquarterapp/uitl/utils.dart';
|
|
|
|
class EyeService extends BaseService {
|
|
List<AppoimentAllHistoryResultList> appoimentAllHistoryResultList = [];
|
|
|
|
getEyeMeasurement() async {
|
|
hasError = false;
|
|
super.error = "";
|
|
Map<String, dynamic> body = Map();
|
|
body['isDentalAllowedBackend'] = false;
|
|
body['IsIrisPrescription'] = true;
|
|
await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, onSuccess: (response, statusCode) async {
|
|
appoimentAllHistoryResultList.clear();
|
|
response['AppoimentAllHistoryResultList'].forEach((appoitment) {
|
|
appoimentAllHistoryResultList.add(AppoimentAllHistoryResultList.fromJson(appoitment));
|
|
});
|
|
}, onFailure: (String error, int statusCode) {
|
|
hasError = true;
|
|
super.error = error;
|
|
}, body: body);
|
|
}
|
|
|
|
sendGlassesPrescriptionEmail({int? appointmentNo, String? projectName, int? projectID}) async {
|
|
hasError = false;
|
|
super.error = "";
|
|
Map<String, dynamic> body = Map();
|
|
body['isDentalAllowedBackend'] = false;
|
|
body['PatientIditificationNum'] = user.patientIdentificationNo;
|
|
body['PatientName'] = user.firstName! + " " + user.lastName!;
|
|
body['To'] = user.emailAddress;
|
|
body['SetupID'] = user.setupID;
|
|
body['DateofBirth'] = user.dateofBirth;
|
|
body['ProjectID'] = projectID;
|
|
body['AppointmentNo'] = appointmentNo;
|
|
body['ProjectName'] = projectName;
|
|
body['PatientID'] = user.patientID;
|
|
body['PatientMobileNumber'] = Utils.getPhoneNumberWithoutZero(user.mobileNumber!);
|
|
await baseAppClient.post(SEND_REPORT_EYE_EMAIL, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) {
|
|
hasError = true;
|
|
super.error = error;
|
|
}, body: body);
|
|
}
|
|
|
|
sendContactLensPrescriptionEmail({int? appointmentNo, String? projectName, int? projectID}) async {
|
|
hasError = false;
|
|
super.error = "";
|
|
Map<String, dynamic> body = Map();
|
|
body['isDentalAllowedBackend'] = false;
|
|
body['AppointmentNo'] = appointmentNo;
|
|
body['PatientIditificationNum'] = user.patientIdentificationNo;
|
|
body['PatientName'] = user.firstName! + " " + user.lastName!;
|
|
body['To'] = user.emailAddress;
|
|
body['SetupID'] = user.setupID;
|
|
body['DateofBirth'] = user.dateofBirth;
|
|
body['ProjectID'] = projectID;
|
|
body['AppointmentNo'] = appointmentNo;
|
|
body['ProjectName'] = projectName;
|
|
body['PatientID'] = user.patientID;
|
|
body['PatientMobileNumber'] = Utils.getPhoneNumberWithoutZero(user.mobileNumber!);
|
|
await baseAppClient.post(SEND_CONTACT_LENS_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) {
|
|
hasError = true;
|
|
super.error = error;
|
|
}, body: body);
|
|
}
|
|
}
|