Compare commits
111 Commits
prescrepti
...
developmen
| Author | SHA1 | Date |
|---|---|---|
|
|
bc7f3e9f35 | 4 years ago |
|
|
3a9c64779e | 4 years ago |
|
|
4fe2a4444d | 4 years ago |
|
|
bcb1e90ae6 | 4 years ago |
|
|
6bdb2a1600 | 4 years ago |
|
|
092cfbc891 | 4 years ago |
|
|
f2bb245c25 | 4 years ago |
|
|
8b79b0041c | 4 years ago |
|
|
5f7b52a529 | 4 years ago |
|
|
17f32c4dc8 | 4 years ago |
|
|
986af6ba9c | 4 years ago |
|
|
d717d9e0cf | 4 years ago |
|
|
10798f73de | 4 years ago |
|
|
d4f01c19f7 | 4 years ago |
|
|
6c1425ad5a | 4 years ago |
|
|
46760ffc77 | 4 years ago |
|
|
8069e89a61 | 4 years ago |
|
|
c30d6bebd8 | 4 years ago |
|
|
5422472ccc | 4 years ago |
|
|
33b8d6d78d | 4 years ago |
|
|
1a3ad32aa5 | 4 years ago |
|
|
70573d190a | 4 years ago |
|
|
379bfd5bb3 | 4 years ago |
|
|
041c652b86 | 4 years ago |
|
|
89d4a7aacb | 4 years ago |
|
|
9ecfe896f9 | 4 years ago |
|
|
f84ae8b4e7 | 4 years ago |
|
|
447ca6d4dc | 4 years ago |
|
|
4b7b4fda7f | 4 years ago |
|
|
e242aa19bc | 4 years ago |
|
|
9f7cdba8b7 | 4 years ago |
|
|
8bdde45d81 | 4 years ago |
|
|
8c93d5c450 | 4 years ago |
|
|
28defc2582 | 4 years ago |
|
|
f1dd50d7bf | 4 years ago |
|
|
31082249e5 | 4 years ago |
|
|
5ec07bb931 | 4 years ago |
|
|
36e245dd7d | 4 years ago |
|
|
077cad7df5 | 4 years ago |
|
|
a019319589 | 4 years ago |
|
|
323e3f3538 | 4 years ago |
|
|
e73271cb29 | 4 years ago |
|
|
1ac24bee90 | 4 years ago |
|
|
e85a32274a | 4 years ago |
|
|
010310eb48 | 4 years ago |
|
|
47352ae77d | 4 years ago |
|
|
4e6c940cdf | 4 years ago |
|
|
1ca7b28590 | 4 years ago |
|
|
e935014776 | 4 years ago |
|
|
e3a71945de | 4 years ago |
|
|
d743c2c99c | 4 years ago |
|
|
e1c635a911 | 4 years ago |
|
|
7fc52ecad4 | 4 years ago |
|
|
31cf229763 | 4 years ago |
|
|
286dbe0a3f | 4 years ago |
|
|
dfc792ce64 | 4 years ago |
|
|
fa4e4b0dfd | 4 years ago |
|
|
b7892fc18e | 4 years ago |
|
|
6107639ecd | 4 years ago |
|
|
3f41ff267a | 4 years ago |
|
|
c96939e6b0 | 4 years ago |
|
|
fcdec6dbf7 | 4 years ago |
|
|
9a1a7ed247 | 4 years ago |
|
|
7dc71d01de | 4 years ago |
|
|
4eaa62a48c | 4 years ago |
|
|
1dd66803fa | 4 years ago |
|
|
4d820728e8 | 4 years ago |
|
|
eaea16e480 | 4 years ago |
|
|
65ae00cec2 | 4 years ago |
|
|
41e79d5e00 | 4 years ago |
|
|
7962d9b1be | 4 years ago |
|
|
8980f6f440 | 4 years ago |
|
|
39c64779aa | 4 years ago |
|
|
95321a9305 | 4 years ago |
|
|
ed6af7f26e | 4 years ago |
|
|
f7770c0315 | 4 years ago |
|
|
505c3f470f | 4 years ago |
|
|
dc37e2e559 | 4 years ago |
|
|
47dd2ecf56 | 4 years ago |
|
|
d32731451c | 4 years ago |
|
|
208aa9dd6e | 4 years ago |
|
|
4c7db58489 | 4 years ago |
|
|
63b6a957b6 | 4 years ago |
|
|
e61d1e78f6 | 4 years ago |
|
|
c93ea2f285 | 4 years ago |
|
|
240c9aa411 | 4 years ago |
|
|
c083f9ffa3 | 4 years ago |
|
|
e732f9e61c | 4 years ago |
|
|
81d3aa5ad1 | 4 years ago |
|
|
177a2e8bc4 | 4 years ago |
|
|
01cd91ef93 | 4 years ago |
|
|
c4f2543471 | 4 years ago |
|
|
40faef136d | 4 years ago |
|
|
70fa365377 | 4 years ago |
|
|
e5fe12f26b | 4 years ago |
|
|
9f7dbf5ec7 | 4 years ago |
|
|
d22ea2e2fa | 4 years ago |
|
|
17a6ec5795 | 4 years ago |
|
|
d4cef7ba5f | 4 years ago |
|
|
7812d5081e | 4 years ago |
|
|
dceefadc06 | 4 years ago |
|
|
f3b39906f5 | 4 years ago |
|
|
22c26c02de | 4 years ago |
|
|
4505ef9d02 | 4 years ago |
|
|
40c1502a9b | 4 years ago |
|
|
f4c7be6cc2 | 4 years ago |
|
|
b1ddd9935c | 4 years ago |
|
|
ada10f595a | 4 years ago |
|
|
ba62056c4d | 4 years ago |
|
|
954402fe52 | 4 years ago |
|
|
9461d3d4a1 | 4 years ago |
@ -0,0 +1,25 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,145 @@
|
|||||||
|
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,60 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
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,20 +1,3 @@
|
|||||||
// 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;
|
||||||
@ -1,64 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
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());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,238 +0,0 @@
|
|||||||
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());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
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