Compare commits
No commits in common. 'development' and 'pharmacy_redesign' have entirely different histories.
developmen
...
pharmacy_r
@ -1,25 +0,0 @@
|
|||||||
class DoctorErSignAssessmentReqModel {
|
|
||||||
String setupID;
|
|
||||||
int signInType;
|
|
||||||
int loginDoctorID;
|
|
||||||
int patientID;
|
|
||||||
|
|
||||||
DoctorErSignAssessmentReqModel(
|
|
||||||
{this.setupID, this.signInType, this.loginDoctorID, this.patientID});
|
|
||||||
|
|
||||||
DoctorErSignAssessmentReqModel.fromJson(Map<String, dynamic> json) {
|
|
||||||
setupID = json['SetupID'];
|
|
||||||
signInType = json['SignInType'];
|
|
||||||
loginDoctorID = json['LoginDoctorID'];
|
|
||||||
patientID = json['PatientID'];
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
||||||
data['SetupID'] = this.setupID;
|
|
||||||
data['SignInType'] = this.signInType;
|
|
||||||
data['LoginDoctorID'] = this.loginDoctorID;
|
|
||||||
data['PatientID'] = this.patientID;
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,145 +0,0 @@
|
|||||||
class PrescriptionEntityModel {
|
|
||||||
dynamic appointmentNo;
|
|
||||||
dynamic clinicName;
|
|
||||||
dynamic createdBy;
|
|
||||||
dynamic createdOn;
|
|
||||||
dynamic doctorName;
|
|
||||||
dynamic doseDailyQuantity;
|
|
||||||
dynamic doseDailyUnitID;
|
|
||||||
dynamic doseDetail;
|
|
||||||
dynamic doseDurationDays;
|
|
||||||
dynamic doseTimingID;
|
|
||||||
dynamic episodeID;
|
|
||||||
dynamic frequencyID;
|
|
||||||
dynamic icdCode10ID;
|
|
||||||
dynamic indication;
|
|
||||||
dynamic isDispensed;
|
|
||||||
dynamic isMedicineCovered;
|
|
||||||
dynamic isSIG;
|
|
||||||
dynamic medicationName;
|
|
||||||
dynamic medicationPrice;
|
|
||||||
dynamic medicineCode;
|
|
||||||
dynamic orderTypeDescription;
|
|
||||||
dynamic qty;
|
|
||||||
dynamic quantity;
|
|
||||||
dynamic remarks;
|
|
||||||
dynamic routeID;
|
|
||||||
dynamic startDate;
|
|
||||||
dynamic status;
|
|
||||||
dynamic stopDate;
|
|
||||||
dynamic uom;
|
|
||||||
dynamic pharmacistRemarks;
|
|
||||||
dynamic pharmacyInervention;
|
|
||||||
dynamic refill;
|
|
||||||
dynamic mediSpanGPICode;
|
|
||||||
|
|
||||||
PrescriptionEntityModel(
|
|
||||||
{this.appointmentNo,
|
|
||||||
this.clinicName,
|
|
||||||
this.createdBy,
|
|
||||||
this.createdOn,
|
|
||||||
this.doctorName,
|
|
||||||
this.doseDailyQuantity,
|
|
||||||
this.doseDailyUnitID,
|
|
||||||
this.doseDetail,
|
|
||||||
this.doseDurationDays,
|
|
||||||
this.doseTimingID,
|
|
||||||
this.episodeID,
|
|
||||||
this.frequencyID,
|
|
||||||
this.icdCode10ID,
|
|
||||||
this.indication,
|
|
||||||
this.isDispensed,
|
|
||||||
this.isMedicineCovered,
|
|
||||||
this.isSIG,
|
|
||||||
this.medicationName,
|
|
||||||
this.medicationPrice,
|
|
||||||
this.medicineCode,
|
|
||||||
this.orderTypeDescription,
|
|
||||||
this.qty,
|
|
||||||
this.quantity,
|
|
||||||
this.remarks,
|
|
||||||
this.routeID,
|
|
||||||
this.startDate,
|
|
||||||
this.status,
|
|
||||||
this.stopDate,
|
|
||||||
this.uom,
|
|
||||||
this.pharmacistRemarks,
|
|
||||||
this.mediSpanGPICode,
|
|
||||||
this.pharmacyInervention,
|
|
||||||
this.refill});
|
|
||||||
|
|
||||||
PrescriptionEntityModel.fromJson(Map<String, dynamic> json) {
|
|
||||||
appointmentNo = json['appointmentNo'];
|
|
||||||
clinicName = json['clinicName'];
|
|
||||||
createdBy = json['createdBy'];
|
|
||||||
createdOn = json['createdOn'];
|
|
||||||
doctorName = json['doctorName'];
|
|
||||||
doseDailyQuantity = json['doseDailyQuantity'];
|
|
||||||
doseDailyUnitID = json['doseDailyUnitID'];
|
|
||||||
doseDetail = json['doseDetail'];
|
|
||||||
doseDurationDays = json['doseDurationDays'];
|
|
||||||
doseTimingID = json['doseTimingID'];
|
|
||||||
episodeID = json['episodeID'];
|
|
||||||
frequencyID = json['frequencyID'];
|
|
||||||
icdCode10ID = json['icdCode10ID'];
|
|
||||||
indication = json['indication'];
|
|
||||||
isDispensed = json['isDispensed'];
|
|
||||||
isMedicineCovered = json['isMedicineCovered'];
|
|
||||||
isSIG = json['isSIG'];
|
|
||||||
medicationName = json['medicationName'];
|
|
||||||
medicationPrice = json['medicationPrice'];
|
|
||||||
medicineCode = json['medicineCode'];
|
|
||||||
orderTypeDescription = json['orderTypeDescription'];
|
|
||||||
qty = json['qty'];
|
|
||||||
quantity = json['quantity'];
|
|
||||||
remarks = json['remarks'];
|
|
||||||
routeID = json['routeID'];
|
|
||||||
startDate = json['startDate'];
|
|
||||||
status = json['status'];
|
|
||||||
stopDate = json['stopDate'];
|
|
||||||
uom = json['uom'];
|
|
||||||
pharmacistRemarks = json['pharmacistRemarks'];
|
|
||||||
mediSpanGPICode = json['mediSpanGPICode'];
|
|
||||||
refill = json['refill'];
|
|
||||||
pharmacyInervention = json['interventionID'];
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
||||||
data['appointmentNo'] = this.appointmentNo;
|
|
||||||
data['clinicName'] = this.clinicName;
|
|
||||||
data['createdBy'] = this.createdBy;
|
|
||||||
data['createdOn'] = this.createdOn;
|
|
||||||
data['doctorName'] = this.doctorName;
|
|
||||||
data['doseDailyQuantity'] = this.doseDailyQuantity;
|
|
||||||
data['doseDailyUnitID'] = this.doseDailyUnitID;
|
|
||||||
data['doseDetail'] = this.doseDetail;
|
|
||||||
data['doseDurationDays'] = this.doseDurationDays;
|
|
||||||
data['doseTimingID'] = this.doseTimingID;
|
|
||||||
data['episodeID'] = this.episodeID;
|
|
||||||
data['frequencyID'] = this.frequencyID;
|
|
||||||
data['icdCode10ID'] = this.icdCode10ID;
|
|
||||||
data['indication'] = this.indication;
|
|
||||||
data['isDispensed'] = this.isDispensed;
|
|
||||||
data['isMedicineCovered'] = this.isMedicineCovered;
|
|
||||||
data['isSIG'] = this.isSIG;
|
|
||||||
data['medicationName'] = this.medicationName;
|
|
||||||
data['medicationPrice'] = this.medicationPrice;
|
|
||||||
data['medicineCode'] = this.medicineCode;
|
|
||||||
data['orderTypeDescription'] = this.orderTypeDescription;
|
|
||||||
data['qty'] = this.qty;
|
|
||||||
data['quantity'] = this.quantity;
|
|
||||||
data['remarks'] = this.remarks;
|
|
||||||
data['routeID'] = this.routeID;
|
|
||||||
data['startDate'] = this.startDate;
|
|
||||||
data['status'] = this.status;
|
|
||||||
data['stopDate'] = this.stopDate;
|
|
||||||
data['uom'] = this.uom;
|
|
||||||
data['pharmacistRemarks'] = this.pharmacistRemarks;
|
|
||||||
data['mediSpanGPICode'] = this.mediSpanGPICode;
|
|
||||||
data['refill'] = this.refill;
|
|
||||||
data['interventionID'] = this.pharmacyInervention;
|
|
||||||
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,20 +1,26 @@
|
|||||||
class PrescriptionReqModel {
|
class PrescriptionReqModel {
|
||||||
|
String vidaAuthTokenID;
|
||||||
dynamic patientMRN;
|
dynamic patientMRN;
|
||||||
dynamic appNo;
|
dynamic appNo;
|
||||||
|
dynamic admissionNo;
|
||||||
|
|
||||||
PrescriptionReqModel(
|
PrescriptionReqModel(
|
||||||
{ this.patientMRN, this.appNo});
|
{this.vidaAuthTokenID, this.patientMRN, this.appNo, this.admissionNo});
|
||||||
|
|
||||||
PrescriptionReqModel.fromJson(Map<String, dynamic> json) {
|
PrescriptionReqModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
vidaAuthTokenID = json['VidaAuthTokenID'];
|
||||||
patientMRN = json['PatientMRN'];
|
patientMRN = json['PatientMRN'];
|
||||||
appNo = json['AppointmentNo'];
|
appNo = json['AppointmentNo'];
|
||||||
|
admissionNo = json['AdmissionNo'];
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
|
||||||
data['PatientMRN'] = this.patientMRN;
|
data['PatientMRN'] = this.patientMRN;
|
||||||
data['AppointmentNo'] = this.appNo;
|
data['AppointmentNo'] = this.appNo;
|
||||||
|
data['AdmissionNo'] = this.admissionNo;
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,60 @@
|
|||||||
|
class AllergyModel {
|
||||||
|
int allergyDiseaseId;
|
||||||
|
String allergyDiseaseName;
|
||||||
|
int allergyDiseaseType;
|
||||||
|
int appointmentNo;
|
||||||
|
int createdBy;
|
||||||
|
String createdByName;
|
||||||
|
String createdOn;
|
||||||
|
int episodeID;
|
||||||
|
bool isChecked;
|
||||||
|
bool isUpdatedByNurse;
|
||||||
|
int severity;
|
||||||
|
String severityName;
|
||||||
|
|
||||||
|
AllergyModel(
|
||||||
|
{this.allergyDiseaseId,
|
||||||
|
this.allergyDiseaseName,
|
||||||
|
this.allergyDiseaseType,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.createdBy,
|
||||||
|
this.createdByName,
|
||||||
|
this.createdOn,
|
||||||
|
this.episodeID,
|
||||||
|
this.isChecked,
|
||||||
|
this.isUpdatedByNurse,
|
||||||
|
this.severity,
|
||||||
|
this.severityName});
|
||||||
|
|
||||||
|
AllergyModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
allergyDiseaseId = json['allergyDiseaseId'];
|
||||||
|
allergyDiseaseName = json['allergyDiseaseName'];
|
||||||
|
allergyDiseaseType = json['allergyDiseaseType'];
|
||||||
|
appointmentNo = json['appointmentNo'];
|
||||||
|
createdBy = json['createdBy'];
|
||||||
|
createdByName = json['createdByName'];
|
||||||
|
createdOn = json['createdOn'];
|
||||||
|
episodeID = json['episodeID'];
|
||||||
|
isChecked = json['isChecked'];
|
||||||
|
isUpdatedByNurse = json['isUpdatedByNurse'];
|
||||||
|
severity = json['severity'];
|
||||||
|
severityName = json['severityName'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['allergyDiseaseId'] = this.allergyDiseaseId;
|
||||||
|
data['allergyDiseaseName'] = this.allergyDiseaseName;
|
||||||
|
data['allergyDiseaseType'] = this.allergyDiseaseType;
|
||||||
|
data['appointmentNo'] = this.appointmentNo;
|
||||||
|
data['createdBy'] = this.createdBy;
|
||||||
|
data['createdByName'] = this.createdByName;
|
||||||
|
data['createdOn'] = this.createdOn;
|
||||||
|
data['episodeID'] = this.episodeID;
|
||||||
|
data['isChecked'] = this.isChecked;
|
||||||
|
data['isUpdatedByNurse'] = this.isUpdatedByNurse;
|
||||||
|
data['severity'] = this.severity;
|
||||||
|
data['severityName'] = this.severityName;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,19 +0,0 @@
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
|
||||||
import 'package:charts_flutter/flutter.dart';
|
|
||||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
||||||
import 'package:doctor_app_flutter/widgets/data_display/list/flexible_container.dart';
|
|
||||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
class TimeSeriesSales {
|
|
||||||
final DateTime time;
|
|
||||||
final int sales;
|
|
||||||
|
|
||||||
TimeSeriesSales(this.time, this.sales);
|
|
||||||
}
|
|
||||||
|
|
||||||
class TimeSeriesSales2 {
|
|
||||||
final DateTime time;
|
|
||||||
final double sales;
|
|
||||||
|
|
||||||
TimeSeriesSales2(this.time, this.sales);
|
|
||||||
}
|
|
||||||
@ -1,3 +1,20 @@
|
|||||||
|
// final List<Countries> countries = [
|
||||||
|
// new Countries(
|
||||||
|
// name: "Saudi Arabia", name_ar: "المملكة العربية السعودية", code: '966'),
|
||||||
|
// new Countries(
|
||||||
|
// name: "United Arab Emirates",
|
||||||
|
// name_ar: "الإمارات العربية المتحدة",
|
||||||
|
// code: '971'),
|
||||||
|
// ];
|
||||||
|
|
||||||
|
// class Countries {
|
||||||
|
// final String name;
|
||||||
|
// final String name_ar;
|
||||||
|
// final String code;
|
||||||
|
|
||||||
|
// Countries({this.name, this.name_ar, this.code});
|
||||||
|
// }
|
||||||
|
|
||||||
class Countries {
|
class Countries {
|
||||||
String name;
|
String name;
|
||||||
String nameAr;
|
String nameAr;
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
class RequestPatientLabOrders {
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
int languageID;
|
||||||
|
String iPAdress;
|
||||||
|
String generalid;
|
||||||
|
int patientOutSA;
|
||||||
|
String sessionID;
|
||||||
|
bool isDentalAllowedBackend;
|
||||||
|
int deviceTypeID;
|
||||||
|
int patientID;
|
||||||
|
String tokenID;
|
||||||
|
int patientTypeID;
|
||||||
|
int patientType;
|
||||||
|
|
||||||
|
RequestPatientLabOrders(
|
||||||
|
{this.versionID,
|
||||||
|
this.channel,
|
||||||
|
this.languageID,
|
||||||
|
this.iPAdress,
|
||||||
|
this.generalid,
|
||||||
|
this.patientOutSA,
|
||||||
|
this.sessionID,
|
||||||
|
this.isDentalAllowedBackend,
|
||||||
|
this.deviceTypeID,
|
||||||
|
this.patientID,
|
||||||
|
this.tokenID,
|
||||||
|
this.patientTypeID,
|
||||||
|
this.patientType});
|
||||||
|
|
||||||
|
RequestPatientLabOrders.fromJson(Map<String, dynamic> json) {
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
generalid = json['generalid'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||||
|
deviceTypeID = json['DeviceTypeID'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
patientTypeID = json['PatientTypeID'];
|
||||||
|
patientType = json['PatientType'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['generalid'] = this.generalid;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['SessionID'] = this.sessionID;
|
||||||
|
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||||
|
data['DeviceTypeID'] = this.deviceTypeID;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['TokenID'] = this.tokenID;
|
||||||
|
data['PatientTypeID'] = this.patientTypeID;
|
||||||
|
data['PatientType'] = this.patientType;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,32 +0,0 @@
|
|||||||
class StpMasterListRequestModel {
|
|
||||||
bool isDentalAllowedBackend;
|
|
||||||
int languageID;
|
|
||||||
int projectID;
|
|
||||||
int parameterGroup;
|
|
||||||
int parameterType;
|
|
||||||
|
|
||||||
StpMasterListRequestModel(
|
|
||||||
{this.isDentalAllowedBackend,
|
|
||||||
this.languageID,
|
|
||||||
this.projectID,
|
|
||||||
this.parameterGroup,
|
|
||||||
this.parameterType});
|
|
||||||
|
|
||||||
StpMasterListRequestModel.fromJson(Map<String, dynamic> json) {
|
|
||||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
|
||||||
languageID = json['LanguageID'];
|
|
||||||
projectID = json['ProjectID'];
|
|
||||||
parameterGroup = json['parameterGroup'];
|
|
||||||
parameterType = json['parameterType'];
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
||||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
|
||||||
data['LanguageID'] = this.languageID;
|
|
||||||
data['ProjectID'] = this.projectID;
|
|
||||||
data['parameterGroup'] = this.parameterGroup;
|
|
||||||
data['parameterType'] = this.parameterType;
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
class StpMasterListResponseModel {
|
|
||||||
int parameterCode;
|
|
||||||
String description;
|
|
||||||
Null descriptionN;
|
|
||||||
|
|
||||||
StpMasterListResponseModel(
|
|
||||||
{this.parameterCode, this.description, this.descriptionN});
|
|
||||||
|
|
||||||
StpMasterListResponseModel.fromJson(Map<String, dynamic> json) {
|
|
||||||
parameterCode = json['ParameterCode'];
|
|
||||||
description = json['Description'];
|
|
||||||
descriptionN = json['DescriptionN'];
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
||||||
data['ParameterCode'] = this.parameterCode;
|
|
||||||
data['Description'] = this.description;
|
|
||||||
data['DescriptionN'] = this.descriptionN;
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
import 'package:doctor_app_flutter/config/config.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/ER_sign_in/doctor_ER_sign_assessment_req_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_request_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_entity_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_req_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/request_get_list_pharmacy_for_prescriptions.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report_enh.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/SOAP/Allergy/get_allergies_res_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_res_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/calculate_box_request_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/search_drug/item_by_medicine_request_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/search_drug/search_drug_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/search_drug/search_drug_request_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/service/base/lookup-service.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_req_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-data.dart';
|
|
||||||
import 'package:doctor_app_flutter/utils/date-utils.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
|
|
||||||
class ERSignInService extends LookupService {
|
|
||||||
|
|
||||||
|
|
||||||
Future signInERPatient({DoctorErSignAssessmentReqModel doctorErSignAssessmentReqModel}) async {
|
|
||||||
|
|
||||||
|
|
||||||
hasError = false;
|
|
||||||
|
|
||||||
await baseAppClient.post(DOCTOR_ER_SIGN_ASSESSMENT,
|
|
||||||
onSuccess: (dynamic response, int statusCode) {
|
|
||||||
|
|
||||||
}, onFailure: (String error, int statusCode) {
|
|
||||||
hasError = true;
|
|
||||||
super.error = error;
|
|
||||||
}, body: doctorErSignAssessmentReqModel.toJson());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -0,0 +1,238 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescriptions/in_patient_prescription_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescriptions/request_get_list_pharmacy_for_prescriptions.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report_enh.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
import '../../base/base_service.dart';
|
||||||
|
|
||||||
|
class PrescriptionsService extends BaseService {
|
||||||
|
List<Prescriptions> prescriptionsList = List();
|
||||||
|
List<GetMedicationForInPatientModel> medicationForInPatient = List();
|
||||||
|
List<PrescriptionsOrder> prescriptionsOrderList = List();
|
||||||
|
List<PrescriotionInPatient> prescriptionInPatientList = List();
|
||||||
|
|
||||||
|
InPatientPrescriptionRequestModel _inPatientPrescriptionRequestModel =
|
||||||
|
InPatientPrescriptionRequestModel();
|
||||||
|
GetMedicationForInPatientRequestModel _getMedicationForInPatientRequestModel =
|
||||||
|
GetMedicationForInPatientRequestModel();
|
||||||
|
|
||||||
|
Future getPrescriptionInPatient({int mrn, String adn}) async {
|
||||||
|
_inPatientPrescriptionRequestModel = InPatientPrescriptionRequestModel(
|
||||||
|
patientMRN: mrn,
|
||||||
|
admissionNo: adn,
|
||||||
|
);
|
||||||
|
hasError = false;
|
||||||
|
prescriptionInPatientList.clear();
|
||||||
|
|
||||||
|
await baseAppClient.post(GET_PRESCRIPTION_IN_PATIENT,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
prescriptionsList.clear();
|
||||||
|
response['List_PrescriptionReportForInPatient'].forEach((prescriptions) {
|
||||||
|
prescriptionInPatientList
|
||||||
|
.add(PrescriotionInPatient.fromJson(prescriptions));
|
||||||
|
});
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: _inPatientPrescriptionRequestModel.toJson());
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getPrescriptions(PatiantInformtion patient) async {
|
||||||
|
hasError = false;
|
||||||
|
Map<String, dynamic> body = Map();
|
||||||
|
body['isDentalAllowedBackend'] = false;
|
||||||
|
await baseAppClient.postPatient(PRESCRIPTIONS, patient: patient,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
prescriptionsList.clear();
|
||||||
|
response['PatientPrescriptionList'].forEach((prescriptions) {
|
||||||
|
prescriptionsList.add(Prescriptions.fromJson(prescriptions));
|
||||||
|
});
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: body);
|
||||||
|
}
|
||||||
|
|
||||||
|
RequestPrescriptionReport _requestPrescriptionReport =
|
||||||
|
RequestPrescriptionReport(
|
||||||
|
appointmentNo: 0, isDentalAllowedBackend: false);
|
||||||
|
List<PrescriptionReport> prescriptionReportList = List();
|
||||||
|
|
||||||
|
Future getPrescriptionReport(
|
||||||
|
{Prescriptions prescriptions,
|
||||||
|
@required PatiantInformtion patient}) async {
|
||||||
|
hasError = false;
|
||||||
|
_requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo;
|
||||||
|
_requestPrescriptionReport.projectID = prescriptions.projectID;
|
||||||
|
_requestPrescriptionReport.clinicID = prescriptions.clinicID;
|
||||||
|
_requestPrescriptionReport.setupID = prescriptions.setupID;
|
||||||
|
_requestPrescriptionReport.episodeID = prescriptions.episodeID;
|
||||||
|
_requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo;
|
||||||
|
|
||||||
|
await baseAppClient.postPatient(
|
||||||
|
prescriptions.isInOutPatient
|
||||||
|
? GET_PRESCRIPTION_REPORT_ENH
|
||||||
|
: GET_PRESCRIPTION_REPORT_NEW,
|
||||||
|
patient: patient, onSuccess: (dynamic response, int statusCode) {
|
||||||
|
prescriptionReportList.clear();
|
||||||
|
prescriptionReportEnhList.clear();
|
||||||
|
if (prescriptions.isInOutPatient) {
|
||||||
|
response['ListPRM'].forEach((prescriptions) {
|
||||||
|
prescriptionReportList
|
||||||
|
.add(PrescriptionReport.fromJson(prescriptions));
|
||||||
|
prescriptionReportEnhList
|
||||||
|
.add(PrescriptionReportEnh.fromJson(prescriptions));
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
|
||||||
|
prescriptionReportList
|
||||||
|
.add(PrescriptionReport.fromJson(prescriptions));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: _requestPrescriptionReport.toJson());
|
||||||
|
}
|
||||||
|
|
||||||
|
RequestGetListPharmacyForPrescriptions
|
||||||
|
requestGetListPharmacyForPrescriptions =
|
||||||
|
RequestGetListPharmacyForPrescriptions(
|
||||||
|
latitude: 0,
|
||||||
|
longitude: 0,
|
||||||
|
isDentalAllowedBackend: false,
|
||||||
|
);
|
||||||
|
List<PharmacyPrescriptions> pharmacyPrescriptionsList = List();
|
||||||
|
|
||||||
|
Future getListPharmacyForPrescriptions(
|
||||||
|
{int itemId, @required PatiantInformtion patient}) async {
|
||||||
|
hasError = false;
|
||||||
|
requestGetListPharmacyForPrescriptions.itemID = itemId;
|
||||||
|
await baseAppClient.postPatient(GET_PHARMACY_LIST, patient: patient,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
pharmacyPrescriptionsList.clear();
|
||||||
|
response['PharmList'].forEach((prescriptions) {
|
||||||
|
pharmacyPrescriptionsList
|
||||||
|
.add(PharmacyPrescriptions.fromJson(prescriptions));
|
||||||
|
});
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: requestGetListPharmacyForPrescriptions.toJson());
|
||||||
|
}
|
||||||
|
|
||||||
|
RequestPrescriptionReportEnh _requestPrescriptionReportEnh =
|
||||||
|
RequestPrescriptionReportEnh(
|
||||||
|
isDentalAllowedBackend: false,
|
||||||
|
);
|
||||||
|
|
||||||
|
List<PrescriptionReportEnh> prescriptionReportEnhList = List();
|
||||||
|
|
||||||
|
Future getPrescriptionReportEnh(
|
||||||
|
{PrescriptionsOrder prescriptionsOrder,
|
||||||
|
@required PatiantInformtion patient}) async {
|
||||||
|
///This logic copy from the old app from class [order-history.component.ts] in line 45
|
||||||
|
bool isInPatient = false;
|
||||||
|
prescriptionsList.forEach((element) {
|
||||||
|
if (prescriptionsOrder.appointmentNo == "0") {
|
||||||
|
if (element.dischargeNo == int.parse(prescriptionsOrder.dischargeID)) {
|
||||||
|
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
|
||||||
|
_requestPrescriptionReportEnh.clinicID = element.clinicID;
|
||||||
|
_requestPrescriptionReportEnh.projectID = element.projectID;
|
||||||
|
_requestPrescriptionReportEnh.episodeID = element.episodeID;
|
||||||
|
_requestPrescriptionReportEnh.setupID = element.setupID;
|
||||||
|
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
|
||||||
|
isInPatient = element.isInOutPatient;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (int.parse(prescriptionsOrder.appointmentNo) ==
|
||||||
|
element.appointmentNo) {
|
||||||
|
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
|
||||||
|
_requestPrescriptionReportEnh.clinicID = element.clinicID;
|
||||||
|
_requestPrescriptionReportEnh.projectID = element.projectID;
|
||||||
|
_requestPrescriptionReportEnh.episodeID = element.episodeID;
|
||||||
|
_requestPrescriptionReportEnh.setupID = element.setupID;
|
||||||
|
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
|
||||||
|
isInPatient = element.isInOutPatient;
|
||||||
|
|
||||||
|
///call inpGetPrescriptionReport
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
hasError = false;
|
||||||
|
|
||||||
|
await baseAppClient.postPatient(
|
||||||
|
isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW,
|
||||||
|
patient: patient, onSuccess: (dynamic response, int statusCode) {
|
||||||
|
prescriptionReportEnhList.clear();
|
||||||
|
|
||||||
|
if (isInPatient) {
|
||||||
|
response['ListPRM'].forEach((prescriptions) {
|
||||||
|
prescriptionReportEnhList
|
||||||
|
.add(PrescriptionReportEnh.fromJson(prescriptions));
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
|
||||||
|
PrescriptionReportEnh reportEnh =
|
||||||
|
PrescriptionReportEnh.fromJson(prescriptions);
|
||||||
|
reportEnh.itemDescription = prescriptions['ItemDescriptionN'];
|
||||||
|
prescriptionReportEnhList.add(reportEnh);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: _requestPrescriptionReportEnh.toJson());
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getPrescriptionsOrders() async {
|
||||||
|
Map<String, dynamic> body = Map();
|
||||||
|
body['isDentalAllowedBackend'] = false;
|
||||||
|
await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
prescriptionsOrderList.clear();
|
||||||
|
response['PatientER_GetPatientAllPresOrdersList']
|
||||||
|
.forEach((prescriptionsOrder) {
|
||||||
|
prescriptionsOrderList
|
||||||
|
.add(PrescriptionsOrder.fromJson(prescriptionsOrder));
|
||||||
|
});
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: body);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getMedicationForInPatient(PatiantInformtion patient) async {
|
||||||
|
hasError = false;
|
||||||
|
_getMedicationForInPatientRequestModel =
|
||||||
|
GetMedicationForInPatientRequestModel(
|
||||||
|
isDentalAllowedBackend: false,
|
||||||
|
admissionNo: int.parse(patient.admissionNo),
|
||||||
|
tokenID: "@dm!n",
|
||||||
|
projectID: patient.projectId,
|
||||||
|
);
|
||||||
|
await baseAppClient.postPatient(GET_MEDICATION_FOR_IN_PATIENT,
|
||||||
|
patient: patient, onSuccess: (dynamic response, int statusCode) {
|
||||||
|
medicationForInPatient.clear();
|
||||||
|
response['List_GetMedicationForInpatient'].forEach((prescriptions) {
|
||||||
|
medicationForInPatient
|
||||||
|
.add(GetMedicationForInPatientModel.fromJson(prescriptions));
|
||||||
|
});
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: _getMedicationForInPatientRequestModel.toJson());
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,41 +0,0 @@
|
|||||||
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/enum/view_state.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/ER_sign_in/doctor_ER_sign_assessment_req_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_entity_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/SOAP/Allergy/get_allergies_res_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_res_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-data.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/service/patient_medical_file/ER_signin/ER_signin_service.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/locator.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
|
|
||||||
class ERSignInViewModel extends BaseViewModel {
|
|
||||||
bool hasError = false;
|
|
||||||
|
|
||||||
ERSignInService _ERSignInService = locator<ERSignInService>();
|
|
||||||
|
|
||||||
Future signInERPatient({int patientId, int signInType}) async {
|
|
||||||
hasError = false;
|
|
||||||
await getDoctorProfile();
|
|
||||||
DoctorErSignAssessmentReqModel doctorErSignAssessmentReqModel = new DoctorErSignAssessmentReqModel(setupID:"010266", signInType:signInType, loginDoctorID:doctorProfile.doctorID, patientID: patientId );
|
|
||||||
setState(ViewState.BusyLocal);
|
|
||||||
await _ERSignInService.signInERPatient(doctorErSignAssessmentReqModel: doctorErSignAssessmentReqModel);
|
|
||||||
if (_ERSignInService.hasError) {
|
|
||||||
error = _ERSignInService.error;
|
|
||||||
setState(ViewState.ErrorLocal);
|
|
||||||
} else
|
|
||||||
setState(ViewState.Idle);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue