finish pending discharge summary
parent
f23607b6e4
commit
6ffbf92d43
@ -0,0 +1,32 @@
|
||||
import 'package:doctor_app_flutter/config/config.dart';
|
||||
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||
import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryReqModel.dart';
|
||||
import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/get_operation_details_request_modle.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/get_operation_details_response_modle.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/get_reservations_response_model.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/get_reservations_request_model.dart';
|
||||
|
||||
class DischargeSummaryService extends BaseService {
|
||||
List<GetDischargeSummaryResModel> _pendingDischargeSummaryList = [];
|
||||
List<GetDischargeSummaryResModel> get pendingDischargeSummaryList => _pendingDischargeSummaryList;
|
||||
|
||||
Future getPendingDischargeSummary(
|
||||
{GetDischargeSummaryReqModel getDischargeSummaryReqModel}) async {
|
||||
|
||||
hasError = false;
|
||||
await baseAppClient.post(GET_PENDING_DISCHARGE_SUMMARY,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
_pendingDischargeSummaryList.clear();
|
||||
response['List_PendingDischargeSummary'].forEach(
|
||||
(v) {
|
||||
_pendingDischargeSummaryList.add(GetDischargeSummaryResModel.fromJson(v));
|
||||
},
|
||||
);
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: getDischargeSummaryReqModel.toJson());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||
import 'package:doctor_app_flutter/core/service/patient/profile/discharge_summary_servive.dart';
|
||||
import 'package:doctor_app_flutter/core/service/patient/profile/operation_report_servive.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
|
||||
import 'package:doctor_app_flutter/locator.dart';
|
||||
import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryReqModel.dart';
|
||||
import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart';
|
||||
|
||||
class DischargeSummaryViewModel extends BaseViewModel {
|
||||
bool hasError = false;
|
||||
DischargeSummaryService _dischargeSummaryService =
|
||||
locator<DischargeSummaryService>();
|
||||
|
||||
List<GetDischargeSummaryResModel> get pendingDischargeSummaryList =>
|
||||
_dischargeSummaryService.pendingDischargeSummaryList;
|
||||
|
||||
|
||||
Future getPendingDischargeSummary({int patientId, int admissionNo, }) async {
|
||||
GetDischargeSummaryReqModel getDischargeSummaryReqModel = GetDischargeSummaryReqModel(admissionNo:admissionNo,patientID: patientId );
|
||||
hasError = false;
|
||||
setState(ViewState.Busy);
|
||||
await _dischargeSummaryService.getPendingDischargeSummary(getDischargeSummaryReqModel: getDischargeSummaryReqModel);
|
||||
if (_dischargeSummaryService.hasError) {
|
||||
error = _dischargeSummaryService.error;
|
||||
setState(ViewState.ErrorLocal);
|
||||
} else {
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||
import 'package:doctor_app_flutter/core/service/operation_report_servive.dart';
|
||||
import 'package:doctor_app_flutter/core/service/patient/profile/operation_report_servive.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
|
||||
import 'package:doctor_app_flutter/locator.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart';
|
||||
@ -0,0 +1,27 @@
|
||||
class GetDischargeSummaryReqModel {
|
||||
int patientID;
|
||||
int admissionNo;
|
||||
int patientType;
|
||||
int patientTypeID;
|
||||
|
||||
GetDischargeSummaryReqModel(
|
||||
{this.patientID, this.admissionNo, this.patientType = 1, this.patientTypeID=1});
|
||||
|
||||
GetDischargeSummaryReqModel.fromJson(Map<String, dynamic> json) {
|
||||
patientID = json['PatientID'];
|
||||
admissionNo = json['AdmissionNo'];
|
||||
patientType = json['PatientType'];
|
||||
patientTypeID = json['PatientTypeID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['PatientID'] = this.patientID;
|
||||
data['AdmissionNo'] = this.admissionNo;
|
||||
data['PatientType'] = this.patientType;
|
||||
data['PatientTypeID'] = this.patientTypeID;
|
||||
data['SetupID'] = "010266";
|
||||
data['isDentalAllowedBackend'] = false;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,192 @@
|
||||
class GetDischargeSummaryResModel {
|
||||
String setupID;
|
||||
int projectID;
|
||||
int dischargeNo;
|
||||
String dischargeDate;
|
||||
int admissionNo;
|
||||
int assessmentNo;
|
||||
int patientType;
|
||||
int patientID;
|
||||
int clinicID;
|
||||
int doctorID;
|
||||
String finalDiagnosis;
|
||||
String persentation;
|
||||
String pastHistory;
|
||||
String planOfCare;
|
||||
String investigations;
|
||||
String followupPlan;
|
||||
String conditionOnDischarge;
|
||||
String significantFindings;
|
||||
String planedProcedure;
|
||||
int daysStayed;
|
||||
String remarks;
|
||||
String eRCare;
|
||||
int status;
|
||||
bool isActive;
|
||||
int createdBy;
|
||||
String createdOn;
|
||||
int editedBy;
|
||||
String editedOn;
|
||||
bool isPatientDied;
|
||||
Null isMedicineApproved;
|
||||
Null isOpenBillDischarge;
|
||||
Null activatedDate;
|
||||
Null activatedBy;
|
||||
Null lAMA;
|
||||
Null patientCodition;
|
||||
Null others;
|
||||
Null reconciliationInstruction;
|
||||
String dischargeInstructions;
|
||||
String reason;
|
||||
Null dischargeDisposition;
|
||||
Null hospitalID;
|
||||
String createdByName;
|
||||
Null createdByNameN;
|
||||
String editedByName;
|
||||
Null editedByNameN;
|
||||
|
||||
GetDischargeSummaryResModel(
|
||||
{this.setupID,
|
||||
this.projectID,
|
||||
this.dischargeNo,
|
||||
this.dischargeDate,
|
||||
this.admissionNo,
|
||||
this.assessmentNo,
|
||||
this.patientType,
|
||||
this.patientID,
|
||||
this.clinicID,
|
||||
this.doctorID,
|
||||
this.finalDiagnosis,
|
||||
this.persentation,
|
||||
this.pastHistory,
|
||||
this.planOfCare,
|
||||
this.investigations,
|
||||
this.followupPlan,
|
||||
this.conditionOnDischarge,
|
||||
this.significantFindings,
|
||||
this.planedProcedure,
|
||||
this.daysStayed,
|
||||
this.remarks,
|
||||
this.eRCare,
|
||||
this.status,
|
||||
this.isActive,
|
||||
this.createdBy,
|
||||
this.createdOn,
|
||||
this.editedBy,
|
||||
this.editedOn,
|
||||
this.isPatientDied,
|
||||
this.isMedicineApproved,
|
||||
this.isOpenBillDischarge,
|
||||
this.activatedDate,
|
||||
this.activatedBy,
|
||||
this.lAMA,
|
||||
this.patientCodition,
|
||||
this.others,
|
||||
this.reconciliationInstruction,
|
||||
this.dischargeInstructions,
|
||||
this.reason,
|
||||
this.dischargeDisposition,
|
||||
this.hospitalID,
|
||||
this.createdByName,
|
||||
this.createdByNameN,
|
||||
this.editedByName,
|
||||
this.editedByNameN});
|
||||
|
||||
GetDischargeSummaryResModel.fromJson(Map<String, dynamic> json) {
|
||||
setupID = json['SetupID'];
|
||||
projectID = json['ProjectID'];
|
||||
dischargeNo = json['DischargeNo'];
|
||||
dischargeDate = json['DischargeDate'];
|
||||
admissionNo = json['AdmissionNo'];
|
||||
assessmentNo = json['AssessmentNo'];
|
||||
patientType = json['PatientType'];
|
||||
patientID = json['PatientID'];
|
||||
clinicID = json['ClinicID'];
|
||||
doctorID = json['DoctorID'];
|
||||
finalDiagnosis = json['FinalDiagnosis'];
|
||||
persentation = json['Persentation'];
|
||||
pastHistory = json['PastHistory'];
|
||||
planOfCare = json['PlanOfCare'];
|
||||
investigations = json['Investigations'];
|
||||
followupPlan = json['FollowupPlan'];
|
||||
conditionOnDischarge = json['ConditionOnDischarge'];
|
||||
significantFindings = json['SignificantFindings'];
|
||||
planedProcedure = json['PlanedProcedure'];
|
||||
daysStayed = json['DaysStayed'];
|
||||
remarks = json['Remarks'];
|
||||
eRCare = json['ERCare'];
|
||||
status = json['Status'];
|
||||
isActive = json['IsActive'];
|
||||
createdBy = json['CreatedBy'];
|
||||
createdOn = json['CreatedOn'];
|
||||
editedBy = json['EditedBy'];
|
||||
editedOn = json['EditedOn'];
|
||||
isPatientDied = json['IsPatientDied'];
|
||||
isMedicineApproved = json['IsMedicineApproved'];
|
||||
isOpenBillDischarge = json['IsOpenBillDischarge'];
|
||||
activatedDate = json['ActivatedDate'];
|
||||
activatedBy = json['ActivatedBy'];
|
||||
lAMA = json['LAMA'];
|
||||
patientCodition = json['PatientCodition'];
|
||||
others = json['Others'];
|
||||
reconciliationInstruction = json['ReconciliationInstruction'];
|
||||
dischargeInstructions = json['DischargeInstructions'];
|
||||
reason = json['Reason'];
|
||||
dischargeDisposition = json['DischargeDisposition'];
|
||||
hospitalID = json['HospitalID'];
|
||||
createdByName = json['CreatedByName'];
|
||||
createdByNameN = json['CreatedByNameN'];
|
||||
editedByName = json['EditedByName'];
|
||||
editedByNameN = json['EditedByNameN'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['SetupID'] = this.setupID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['DischargeNo'] = this.dischargeNo;
|
||||
data['DischargeDate'] = this.dischargeDate;
|
||||
data['AdmissionNo'] = this.admissionNo;
|
||||
data['AssessmentNo'] = this.assessmentNo;
|
||||
data['PatientType'] = this.patientType;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['DoctorID'] = this.doctorID;
|
||||
data['FinalDiagnosis'] = this.finalDiagnosis;
|
||||
data['Persentation'] = this.persentation;
|
||||
data['PastHistory'] = this.pastHistory;
|
||||
data['PlanOfCare'] = this.planOfCare;
|
||||
data['Investigations'] = this.investigations;
|
||||
data['FollowupPlan'] = this.followupPlan;
|
||||
data['ConditionOnDischarge'] = this.conditionOnDischarge;
|
||||
data['SignificantFindings'] = this.significantFindings;
|
||||
data['PlanedProcedure'] = this.planedProcedure;
|
||||
data['DaysStayed'] = this.daysStayed;
|
||||
data['Remarks'] = this.remarks;
|
||||
data['ERCare'] = this.eRCare;
|
||||
data['Status'] = this.status;
|
||||
data['IsActive'] = this.isActive;
|
||||
data['CreatedBy'] = this.createdBy;
|
||||
data['CreatedOn'] = this.createdOn;
|
||||
data['EditedBy'] = this.editedBy;
|
||||
data['EditedOn'] = this.editedOn;
|
||||
data['IsPatientDied'] = this.isPatientDied;
|
||||
data['IsMedicineApproved'] = this.isMedicineApproved;
|
||||
data['IsOpenBillDischarge'] = this.isOpenBillDischarge;
|
||||
data['ActivatedDate'] = this.activatedDate;
|
||||
data['ActivatedBy'] = this.activatedBy;
|
||||
data['LAMA'] = this.lAMA;
|
||||
data['PatientCodition'] = this.patientCodition;
|
||||
data['Others'] = this.others;
|
||||
data['ReconciliationInstruction'] = this.reconciliationInstruction;
|
||||
data['DischargeInstructions'] = this.dischargeInstructions;
|
||||
data['Reason'] = this.reason;
|
||||
data['DischargeDisposition'] = this.dischargeDisposition;
|
||||
data['HospitalID'] = this.hospitalID;
|
||||
data['CreatedByName'] = this.createdByName;
|
||||
data['CreatedByNameN'] = this.createdByNameN;
|
||||
data['EditedByName'] = this.editedByName;
|
||||
data['EditedByNameN'] = this.editedByNameN;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue