|
|
|
|
@ -11,7 +11,6 @@ import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteRequest
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteResposeModel.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/note/note_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/note/stp_master_list_req_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/note/stp_master_list_res_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/patient/get_clinic_by_project_id_request.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/patient/get_doctor_by_clinic_id_request.dart';
|
|
|
|
|
@ -39,15 +38,12 @@ class PatientService extends BaseService {
|
|
|
|
|
|
|
|
|
|
List<LabOrdersResModel> _patientLabResultOrdersList = [];
|
|
|
|
|
|
|
|
|
|
List<LabOrdersResModel> get patientLabResultOrdersList =>
|
|
|
|
|
_patientLabResultOrdersList;
|
|
|
|
|
List<LabOrdersResModel> get patientLabResultOrdersList => _patientLabResultOrdersList;
|
|
|
|
|
|
|
|
|
|
List<PrescriptionResModel> get patientPrescriptionsList =>
|
|
|
|
|
_patientPrescriptionsList;
|
|
|
|
|
List<PrescriptionResModel> get patientPrescriptionsList => _patientPrescriptionsList;
|
|
|
|
|
List<PrescriptionResModel> _patientPrescriptionsList = [];
|
|
|
|
|
|
|
|
|
|
List<PrescriptionReportForInPatient> get prescriptionReportForInPatientList =>
|
|
|
|
|
_prescriptionReportForInPatientList;
|
|
|
|
|
List<PrescriptionReportForInPatient> get prescriptionReportForInPatientList => _prescriptionReportForInPatientList;
|
|
|
|
|
List<PrescriptionReportForInPatient> _prescriptionReportForInPatientList = [];
|
|
|
|
|
|
|
|
|
|
List<RadiologyResModel> _patientRadiologyList = [];
|
|
|
|
|
@ -68,17 +64,14 @@ class PatientService extends BaseService {
|
|
|
|
|
|
|
|
|
|
List<GetNursingProgressNoteResposeModel> _patientNursingProgressNoteList = [];
|
|
|
|
|
|
|
|
|
|
List<GetNursingProgressNoteResposeModel> get patientNursingProgressNoteList =>
|
|
|
|
|
_patientNursingProgressNoteList;
|
|
|
|
|
List<GetNursingProgressNoteResposeModel> get patientNursingProgressNoteList => _patientNursingProgressNoteList;
|
|
|
|
|
|
|
|
|
|
List<GetDiagnosisForInPatientResponseModel> _diagnosisForInPatientList = [];
|
|
|
|
|
|
|
|
|
|
List<GetDiagnosisForInPatientResponseModel> get diagnosisForInPatientList =>
|
|
|
|
|
_diagnosisForInPatientList;
|
|
|
|
|
List<GetDiagnosisForInPatientResponseModel> get diagnosisForInPatientList => _diagnosisForInPatientList;
|
|
|
|
|
List<GetDiabeticChartValuesResponseModel> _diabeticChartValuesList = [];
|
|
|
|
|
|
|
|
|
|
List<GetDiabeticChartValuesResponseModel> get diabeticChartValuesList =>
|
|
|
|
|
_diabeticChartValuesList;
|
|
|
|
|
List<GetDiabeticChartValuesResponseModel> get diabeticChartValuesList => _diabeticChartValuesList;
|
|
|
|
|
|
|
|
|
|
List<dynamic> stpMasterList = [];
|
|
|
|
|
|
|
|
|
|
@ -106,12 +99,9 @@ class PatientService extends BaseService {
|
|
|
|
|
|
|
|
|
|
get referalFrequancyList => _referalFrequancyList;
|
|
|
|
|
|
|
|
|
|
DoctorsByClinicIdRequest _doctorsByClinicIdRequest =
|
|
|
|
|
DoctorsByClinicIdRequest();
|
|
|
|
|
STPReferralFrequencyRequest _referralFrequencyRequest =
|
|
|
|
|
STPReferralFrequencyRequest();
|
|
|
|
|
ClinicByProjectIdRequest _clinicByProjectIdRequest =
|
|
|
|
|
ClinicByProjectIdRequest();
|
|
|
|
|
DoctorsByClinicIdRequest _doctorsByClinicIdRequest = DoctorsByClinicIdRequest();
|
|
|
|
|
STPReferralFrequencyRequest _referralFrequencyRequest = STPReferralFrequencyRequest();
|
|
|
|
|
ClinicByProjectIdRequest _clinicByProjectIdRequest = ClinicByProjectIdRequest();
|
|
|
|
|
ReferToDoctorRequest? _referToDoctorRequest;
|
|
|
|
|
|
|
|
|
|
Future<dynamic> getPatientList(patient, patientType, {isView}) async {
|
|
|
|
|
@ -165,8 +155,7 @@ class PatientService extends BaseService {
|
|
|
|
|
return Future.value(localRes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future getInPatient(
|
|
|
|
|
PatientSearchRequestModel requestModel, bool isMyInpatient) async {
|
|
|
|
|
Future getInPatient(PatientSearchRequestModel requestModel, bool isMyInpatient) async {
|
|
|
|
|
hasError = false;
|
|
|
|
|
|
|
|
|
|
await getDoctorProfile();
|
|
|
|
|
@ -206,7 +195,7 @@ class PatientService extends BaseService {
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
_patientLabResultOrdersList = [];
|
|
|
|
|
response['List_GetLabOreders'].forEach((v) {
|
|
|
|
|
_patientLabResultOrdersList.add(new LabOrdersResModel.fromJson(v));
|
|
|
|
|
_patientLabResultOrdersList.add(LabOrdersResModel.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
@ -242,8 +231,7 @@ class PatientService extends BaseService {
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
_prescriptionReportForInPatientList = [];
|
|
|
|
|
response['List_PrescriptionReportForInPatient'].forEach((v) {
|
|
|
|
|
prescriptionReportForInPatientList
|
|
|
|
|
.add(PrescriptionReportForInPatient.fromJson(v));
|
|
|
|
|
prescriptionReportForInPatientList.add(PrescriptionReportForInPatient.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
@ -498,9 +486,7 @@ class PatientService extends BaseService {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future getNursingProgressNote(
|
|
|
|
|
GetNursingProgressNoteRequestModel
|
|
|
|
|
getNursingProgressNoteRequestModel) async {
|
|
|
|
|
Future getNursingProgressNote(GetNursingProgressNoteRequestModel getNursingProgressNoteRequestModel) async {
|
|
|
|
|
hasError = false;
|
|
|
|
|
|
|
|
|
|
await baseAppClient.post(
|
|
|
|
|
@ -508,8 +494,7 @@ class PatientService extends BaseService {
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
_patientNursingProgressNoteList = [];
|
|
|
|
|
response['List_NursingProgressNote'].forEach((v) {
|
|
|
|
|
_patientNursingProgressNoteList
|
|
|
|
|
.add(GetNursingProgressNoteResposeModel.fromJson(v));
|
|
|
|
|
_patientNursingProgressNoteList.add(GetNursingProgressNoteResposeModel.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
@ -520,9 +505,7 @@ class PatientService extends BaseService {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future getDiagnosisForInPatient(
|
|
|
|
|
GetDiagnosisForInPatientRequestModel
|
|
|
|
|
getDiagnosisForInPatientRequestModel) async {
|
|
|
|
|
Future getDiagnosisForInPatient(GetDiagnosisForInPatientRequestModel getDiagnosisForInPatientRequestModel) async {
|
|
|
|
|
hasError = false;
|
|
|
|
|
|
|
|
|
|
await baseAppClient.post(
|
|
|
|
|
@ -530,8 +513,7 @@ class PatientService extends BaseService {
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
_diagnosisForInPatientList = [];
|
|
|
|
|
response['List_DiagnosisForInPatient'].forEach((v) {
|
|
|
|
|
_diagnosisForInPatientList
|
|
|
|
|
.add(GetDiagnosisForInPatientResponseModel.fromJson(v));
|
|
|
|
|
_diagnosisForInPatientList.add(GetDiagnosisForInPatientResponseModel.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
@ -542,9 +524,7 @@ class PatientService extends BaseService {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future getDiabeticChartValues(
|
|
|
|
|
GetDiabeticChartValuesRequestModel
|
|
|
|
|
getDiabeticChartValuesRequestModel) async {
|
|
|
|
|
Future getDiabeticChartValues(GetDiabeticChartValuesRequestModel getDiabeticChartValuesRequestModel) async {
|
|
|
|
|
hasError = false;
|
|
|
|
|
|
|
|
|
|
await baseAppClient.post(
|
|
|
|
|
@ -552,8 +532,7 @@ class PatientService extends BaseService {
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
_diabeticChartValuesList = [];
|
|
|
|
|
response['List_DiabeticChartValues'].forEach((v) {
|
|
|
|
|
_diabeticChartValuesList
|
|
|
|
|
.add(GetDiabeticChartValuesResponseModel.fromJson(v));
|
|
|
|
|
_diabeticChartValuesList.add(GetDiabeticChartValuesResponseModel.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
@ -564,8 +543,7 @@ class PatientService extends BaseService {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future getStpMasterList(
|
|
|
|
|
StpMasterListRequestModel stpMasterListRequestModel) async {
|
|
|
|
|
Future getStpMasterList(StpMasterListRequestModel stpMasterListRequestModel) async {
|
|
|
|
|
hasError = false;
|
|
|
|
|
|
|
|
|
|
await baseAppClient.post(
|
|
|
|
|
|