|
|
|
|
@ -39,7 +39,7 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
|
var insuranceApporvalsList = [];
|
|
|
|
|
|
|
|
|
|
Client client =
|
|
|
|
|
HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]);
|
|
|
|
|
HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]);
|
|
|
|
|
|
|
|
|
|
PatiantInformtion _selectedPatient;
|
|
|
|
|
|
|
|
|
|
@ -214,7 +214,7 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
|
try {
|
|
|
|
|
if (await Helpers.checkConnection()) {
|
|
|
|
|
final response =
|
|
|
|
|
await AppClient.post(GET_PRESCRIPTION, body: json.encode(patient));
|
|
|
|
|
await AppClient.post(GET_PRESCRIPTION, body: json.encode(patient));
|
|
|
|
|
final int statusCode = response.statusCode;
|
|
|
|
|
isLoading = false;
|
|
|
|
|
|
|
|
|
|
@ -273,7 +273,7 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
|
try {
|
|
|
|
|
if (await Helpers.checkConnection()) {
|
|
|
|
|
final response =
|
|
|
|
|
await AppClient.post(GET_RADIOLOGY, body: json.encode(patient));
|
|
|
|
|
await AppClient.post(GET_RADIOLOGY, body: json.encode(patient));
|
|
|
|
|
final int statusCode = response.statusCode;
|
|
|
|
|
isLoading = false;
|
|
|
|
|
|
|
|
|
|
@ -337,15 +337,37 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getPatientInsuranceApprovals(patient) async {
|
|
|
|
|
//setBasicData();
|
|
|
|
|
getPatientInsuranceApprovals(patient) async{
|
|
|
|
|
getLabResult(LabOrdersResModel labOrdersResModel) async {
|
|
|
|
|
labResultList.clear();
|
|
|
|
|
isLoading = true;
|
|
|
|
|
notifyListeners();
|
|
|
|
|
RequestLabResult requestLabResult = RequestLabResult();
|
|
|
|
|
requestLabResult.sessionID = labOrdersResModel.setupID;
|
|
|
|
|
requestLabResult.orderNo = labOrdersResModel.orderNo;
|
|
|
|
|
requestLabResult.invoiceNo = labOrdersResModel.invoiceNo;
|
|
|
|
|
requestLabResult.patientTypeID = labOrdersResModel.patientType;
|
|
|
|
|
await BaseAppClient.post('DoctorApplication.svc/REST/GetPatientLabResults',
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
isError = false;
|
|
|
|
|
isLoading = false;
|
|
|
|
|
response['List_GetLabNormal'].forEach((v) {
|
|
|
|
|
labResultList.add(new LabResult.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
}, onFailure: (String error, int statusCode) {
|
|
|
|
|
isError = true;
|
|
|
|
|
isLoading = false;
|
|
|
|
|
this.error = error;
|
|
|
|
|
}, body: requestLabResult.toJson());
|
|
|
|
|
notifyListeners();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getPatientInsuranceApprovals(patient) async {
|
|
|
|
|
setBasicData();
|
|
|
|
|
try {
|
|
|
|
|
if (await Helpers.checkConnection()) {
|
|
|
|
|
final response = await AppClient.post(PATIENT_INSURANCE_APPROVALS_URL,
|
|
|
|
|
body: json.encode(patient));
|
|
|
|
|
final response = await AppClient.post(
|
|
|
|
|
PATIENT_INSURANCE_APPROVALS_URL, body: json.encode(patient));
|
|
|
|
|
final int statusCode = response.statusCode;
|
|
|
|
|
isLoading = false;
|
|
|
|
|
|
|
|
|
|
@ -374,27 +396,5 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getLabResult(LabOrdersResModel labOrdersResModel) async {
|
|
|
|
|
labResultList.clear();
|
|
|
|
|
isLoading = true;
|
|
|
|
|
notifyListeners();
|
|
|
|
|
RequestLabResult requestLabResult = RequestLabResult();
|
|
|
|
|
requestLabResult.sessionID = labOrdersResModel.setupID;
|
|
|
|
|
requestLabResult.orderNo = labOrdersResModel.orderNo;
|
|
|
|
|
requestLabResult.invoiceNo = labOrdersResModel.invoiceNo;
|
|
|
|
|
requestLabResult.patientTypeID = labOrdersResModel.patientType;
|
|
|
|
|
await BaseAppClient.post('DoctorApplication.svc/REST/GetPatientLabResults',
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
isError = false;
|
|
|
|
|
isLoading = false;
|
|
|
|
|
response['List_GetLabNormal'].forEach((v) {
|
|
|
|
|
labResultList.add(new LabResult.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
}, onFailure: (String error, int statusCode) {
|
|
|
|
|
isError = true;
|
|
|
|
|
isLoading = false;
|
|
|
|
|
this.error = error;
|
|
|
|
|
}, body: requestLabResult.toJson());
|
|
|
|
|
notifyListeners();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|