Merge branch 'pesrcription-post' into 'development'

Pesrcription post

See merge request Cloud_Solution/doctor_app_flutter!221
merge-requests/222/merge
Mohammad Aljammal 5 years ago
commit 0e34f60cad

@ -1,7 +1,7 @@
class MedicalFileModel { class MedicalFileModel {
List<EntityList> entityList; List<EntityList> entityList;
int rowcount; int rowcount;
dynamic statusMessage; Null statusMessage;
MedicalFileModel({this.entityList, this.rowcount, this.statusMessage}); MedicalFileModel({this.entityList, this.rowcount, this.statusMessage});
@ -190,12 +190,12 @@ class LstDischargeDiag {
projectName = json['ProjectName']; projectName = json['ProjectName'];
remarks = json['Remarks']; remarks = json['Remarks'];
setupID = json['SetupID']; setupID = json['SetupID'];
// if (json['TimeLineEvents'] != null) { if (json['TimeLineEvents'] != null) {
// timeLineEvents = new List<TimeLineEvents>(); timeLineEvents = new List<TimeLineEvents>();
// json['TimeLineEvents'].forEach((v) { json['TimeLineEvents'].forEach((v) {
// timeLineEvents.add(new TimeLineEvents.fromJson(v)); timeLineEvents.add(new TimeLineEvents.fromJson(v));
// }); });
// } }
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -246,7 +246,7 @@ class TimeLineEvents {
this.radReports, this.radReports,
this.toolTip}); this.toolTip});
// TimeLineEvents.fromJson(Map<String, dynamic> json) { TimeLineEvents.fromJson(Map<String, dynamic> json) {
// if (json['Admissions'] != null) { // if (json['Admissions'] != null) {
// admissions = new List<Null>(); // admissions = new List<Null>();
// json['Admissions'].forEach((v) { // json['Admissions'].forEach((v) {
@ -260,14 +260,14 @@ class TimeLineEvents {
// consulations.add(new Null.fromJson(v)); // consulations.add(new Null.fromJson(v));
// }); // });
// } // }
// disPlayName = json['DisPlayName']; disPlayName = json['DisPlayName'];
// doctorName = json['DoctorName']; doctorName = json['DoctorName'];
// eRData = eRData =
// json['ERData'] != null ? new ERData.fromJson(json['ERData']) : null; json['ERData'] != null ? new ERData.fromJson(json['ERData']) : null;
// eventId = json['EventId']; eventId = json['EventId'];
// fullName = json['FullName']; fullName = json['FullName'];
// iconClass = json['IconClass']; iconClass = json['IconClass'];
// isDisabled = json['IsDisabled']; isDisabled = json['IsDisabled'];
// if (json['LabOrders'] != null) { // if (json['LabOrders'] != null) {
// labOrders = new List<Null>(); // labOrders = new List<Null>();
// json['LabOrders'].forEach((v) { // json['LabOrders'].forEach((v) {
@ -280,15 +280,15 @@ class TimeLineEvents {
// radReports.add(new Null.fromJson(v)); // radReports.add(new Null.fromJson(v));
// }); // });
// } // }
// toolTip = json['ToolTip']; toolTip = json['ToolTip'];
// } }
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>();
// if (this.admissions != null) { // if (this.admissions != null) {
// data['Admissions'] = this.admissions.map((v) => v.toJson()).toList(); // data['Admissions'] = this.admissions.map((v) => v.toJson()).toList();
// } // }
data['ColorClass'] = this.colorClass; // data['ColorClass'] = this.colorClass;
// if (this.consulations != null) { // if (this.consulations != null) {
// data['Consulations'] = this.consulations.map((v) => v.toJson()).toList(); // data['Consulations'] = this.consulations.map((v) => v.toJson()).toList();
// } // }
@ -326,7 +326,7 @@ class ERData {
this.radReports, this.radReports,
this.lstErDischargeSummary}); this.lstErDischargeSummary});
// ERData.fromJson(Map<String, dynamic> json) { ERData.fromJson(Map<String, dynamic> json) {
// if (json['Admissions'] != null) { // if (json['Admissions'] != null) {
// admissions = new List<Null>(); // admissions = new List<Null>();
// json['Admissions'].forEach((v) { // json['Admissions'].forEach((v) {
@ -357,7 +357,7 @@ class ERData {
// lstErDischargeSummary.add(new Null.fromJson(v)); // lstErDischargeSummary.add(new Null.fromJson(v));
// }); // });
// } // }
// } }
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>();
@ -827,6 +827,7 @@ class DoctorWisePatientEpisodes {
String setupID; String setupID;
int doctorID; int doctorID;
String doctorName; String doctorName;
List<LstEpisodes> lstEpisodes;
DoctorWisePatientEpisodes( DoctorWisePatientEpisodes(
{this.clinicName, {this.clinicName,
@ -835,7 +836,8 @@ class DoctorWisePatientEpisodes {
this.projectName, this.projectName,
this.setupID, this.setupID,
this.doctorID, this.doctorID,
this.doctorName}); this.doctorName,
this.lstEpisodes});
DoctorWisePatientEpisodes.fromJson(Map<String, dynamic> json) { DoctorWisePatientEpisodes.fromJson(Map<String, dynamic> json) {
clinicName = json['ClinicName']; clinicName = json['ClinicName'];
@ -845,6 +847,12 @@ class DoctorWisePatientEpisodes {
setupID = json['SetupID']; setupID = json['SetupID'];
doctorID = json['doctorID']; doctorID = json['doctorID'];
doctorName = json['doctorName']; doctorName = json['doctorName'];
if (json['lstEpisodes'] != null) {
lstEpisodes = new List<LstEpisodes>();
json['lstEpisodes'].forEach((v) {
lstEpisodes.add(new LstEpisodes.fromJson(v));
});
}
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -856,6 +864,256 @@ class DoctorWisePatientEpisodes {
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
data['doctorID'] = this.doctorID; data['doctorID'] = this.doctorID;
data['doctorName'] = this.doctorName; data['doctorName'] = this.doctorName;
if (this.lstEpisodes != null) {
data['lstEpisodes'] = this.lstEpisodes.map((v) => v.toJson()).toList();
}
return data;
}
}
class LstEpisodes {
int admissionNo;
String appointmentDate;
int appointmentNo;
String appointmentType;
String clinicID;
String clinicName;
int doctorID;
String doctorName;
String endTime;
String episodeDate;
int episodeID;
int patientID;
int projectID;
String projectName;
String remarks;
String setupID;
String startTime;
String visitFor;
String visitType;
String dispalyName;
List<LstAssessments> lstAssessments;
List<LstPhysicalExam> lstPhysicalExam;
LstEpisodes(
{this.admissionNo,
this.appointmentDate,
this.appointmentNo,
this.appointmentType,
this.clinicID,
this.clinicName,
this.doctorID,
this.doctorName,
this.endTime,
this.episodeDate,
this.episodeID,
this.patientID,
this.projectID,
this.projectName,
this.remarks,
this.setupID,
this.startTime,
this.visitFor,
this.visitType,
this.dispalyName,
this.lstAssessments,
this.lstPhysicalExam});
LstEpisodes.fromJson(Map<String, dynamic> json) {
admissionNo = json['AdmissionNo'];
appointmentDate = json['AppointmentDate'];
appointmentNo = json['AppointmentNo'];
appointmentType = json['AppointmentType'];
clinicID = json['ClinicID'];
clinicName = json['ClinicName'];
doctorID = json['DoctorID'];
doctorName = json['DoctorName'];
endTime = json['EndTime'];
episodeDate = json['EpisodeDate'];
episodeID = json['EpisodeID'];
patientID = json['PatientID'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
remarks = json['Remarks'];
setupID = json['SetupID'];
startTime = json['StartTime'];
visitFor = json['VisitFor'];
visitType = json['VisitType'];
dispalyName = json['dispalyName'];
if (json['lstAssessments'] != null) {
lstAssessments = new List<LstAssessments>();
json['lstAssessments'].forEach((v) {
lstAssessments.add(new LstAssessments.fromJson(v));
});
}
if (json['lstPhysicalExam'] != null) {
lstPhysicalExam = new List<LstPhysicalExam>();
json['lstPhysicalExam'].forEach((v) {
lstPhysicalExam.add(new LstPhysicalExam.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['AdmissionNo'] = this.admissionNo;
data['AppointmentDate'] = this.appointmentDate;
data['AppointmentNo'] = this.appointmentNo;
data['AppointmentType'] = this.appointmentType;
data['ClinicID'] = this.clinicID;
data['ClinicName'] = this.clinicName;
data['DoctorID'] = this.doctorID;
data['DoctorName'] = this.doctorName;
data['EndTime'] = this.endTime;
data['EpisodeDate'] = this.episodeDate;
data['EpisodeID'] = this.episodeID;
data['PatientID'] = this.patientID;
data['ProjectID'] = this.projectID;
data['ProjectName'] = this.projectName;
data['Remarks'] = this.remarks;
data['SetupID'] = this.setupID;
data['StartTime'] = this.startTime;
data['VisitFor'] = this.visitFor;
data['VisitType'] = this.visitType;
data['dispalyName'] = this.dispalyName;
if (this.lstAssessments != null) {
data['lstAssessments'] =
this.lstAssessments.map((v) => v.toJson()).toList();
}
if (this.lstPhysicalExam != null) {
data['lstPhysicalExam'] =
this.lstPhysicalExam.map((v) => v.toJson()).toList();
}
return data;
}
}
class LstAssessments {
int appointmentNo;
String condition;
String description;
int episodeID;
String iCD10;
int patientID;
String patientType;
int projectID;
String projectName;
String remarks;
String setupID;
String type;
String dispalyName;
LstAssessments(
{this.appointmentNo,
this.condition,
this.description,
this.episodeID,
this.iCD10,
this.patientID,
this.patientType,
this.projectID,
this.projectName,
this.remarks,
this.setupID,
this.type,
this.dispalyName});
LstAssessments.fromJson(Map<String, dynamic> json) {
appointmentNo = json['AppointmentNo'];
condition = json['Condition'];
description = json['Description'];
episodeID = json['EpisodeID'];
iCD10 = json['ICD10'];
patientID = json['PatientID'];
patientType = json['PatientType'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
remarks = json['Remarks'];
setupID = json['SetupID'];
type = json['Type'];
dispalyName = json['dispalyName'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['AppointmentNo'] = this.appointmentNo;
data['Condition'] = this.condition;
data['Description'] = this.description;
data['EpisodeID'] = this.episodeID;
data['ICD10'] = this.iCD10;
data['PatientID'] = this.patientID;
data['PatientType'] = this.patientType;
data['ProjectID'] = this.projectID;
data['ProjectName'] = this.projectName;
data['Remarks'] = this.remarks;
data['SetupID'] = this.setupID;
data['Type'] = this.type;
data['dispalyName'] = this.dispalyName;
return data;
}
}
class LstPhysicalExam {
String abnormal;
int appointmentNo;
int episodeID;
String examDesc;
String examID;
String examType;
int patientID;
String patientType;
int projectID;
String projectName;
String remarks;
String setupID;
String dispalyName;
LstPhysicalExam(
{this.abnormal,
this.appointmentNo,
this.episodeID,
this.examDesc,
this.examID,
this.examType,
this.patientID,
this.patientType,
this.projectID,
this.projectName,
this.remarks,
this.setupID,
this.dispalyName});
LstPhysicalExam.fromJson(Map<String, dynamic> json) {
abnormal = json['Abnormal'];
appointmentNo = json['AppointmentNo'];
episodeID = json['EpisodeID'];
examDesc = json['ExamDesc'];
examID = json['ExamID'];
examType = json['ExamType'];
patientID = json['PatientID'];
patientType = json['PatientType'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
remarks = json['Remarks'];
setupID = json['SetupID'];
dispalyName = json['dispalyName'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Abnormal'] = this.abnormal;
data['AppointmentNo'] = this.appointmentNo;
data['EpisodeID'] = this.episodeID;
data['ExamDesc'] = this.examDesc;
data['ExamID'] = this.examID;
data['ExamType'] = this.examType;
data['PatientID'] = this.patientID;
data['PatientType'] = this.patientType;
data['ProjectID'] = this.projectID;
data['ProjectName'] = this.projectName;
data['Remarks'] = this.remarks;
data['SetupID'] = this.setupID;
data['dispalyName'] = this.dispalyName;
return data; return data;
} }
} }

@ -35,16 +35,16 @@ void addPrescriptionForm(context, PrescriptionViewModel model) {
isScrollControlled: true, isScrollControlled: true,
context: context, context: context,
builder: (BuildContext bc) { builder: (BuildContext bc) {
return BaseView<PrescriptionViewModel>( return //BaseView<PrescriptionViewModel>(
onModelReady: (model) => model.getDrugs(), //onModelReady: (model) => model.getDrugs(),
builder: (BuildContext context, PrescriptionViewModel model, //builder: (BuildContext context, PrescriptionViewModel model,
Widget child) => //Widget child) =>
DraggableScrollableSheet( DraggableScrollableSheet(
initialChildSize: 0.90, initialChildSize: 0.90,
maxChildSize: 0.90, maxChildSize: 0.90,
minChildSize: 0.9, minChildSize: 0.9,
builder: (BuildContext context, builder:
ScrollController scrollController) { (BuildContext context, ScrollController scrollController) {
return SingleChildScrollView( return SingleChildScrollView(
child: Container( child: Container(
height: 980, height: 980,
@ -78,15 +78,13 @@ void addPrescriptionForm(context, PrescriptionViewModel model) {
width: 1.0, width: 1.0,
color: HexColor("#CCCCCC"))), color: HexColor("#CCCCCC"))),
child: TextFields( child: TextFields(
hintText: hintText: TranslationBase.of(context)
TranslationBase.of(context)
.searchMedicine, .searchMedicine,
controller: drugIdController, controller: drugIdController,
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
validator: (value) { validator: (value) {
if (value.isEmpty) if (value.isEmpty)
return TranslationBase.of( return TranslationBase.of(context)
context)
.emptyMessage; .emptyMessage;
else else
return null; return null;
@ -247,16 +245,14 @@ void addPrescriptionForm(context, PrescriptionViewModel model) {
width: 1.0, width: 1.0,
color: HexColor("#CCCCCC"))), color: HexColor("#CCCCCC"))),
child: TextFields( child: TextFields(
hintText: hintText: TranslationBase.of(context)
TranslationBase.of(context)
.duration, .duration,
// borderColor: Colors.white, // borderColor: Colors.white,
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
controller: durationController, controller: durationController,
validator: (value) { validator: (value) {
if (value.isEmpty) if (value.isEmpty)
return TranslationBase.of( return TranslationBase.of(context)
context)
.emptyMessage; .emptyMessage;
else else
return null; return null;
@ -305,19 +301,15 @@ void addPrescriptionForm(context, PrescriptionViewModel model) {
durationController.text, durationController.text,
dose: doseController.text, dose: doseController.text,
frequency: frequency:
frequencyController frequencyController.text,
.text,
route: routeController.text, route: routeController.text,
drugId: drugId: drugIdController.text,
drugIdController.text,
strength: strength:
strengthController.text, strengthController.text,
indication: indication:
indicationController indicationController.text,
.text,
instruction: instruction:
indicationController indicationController.text,
.text,
); );
Navigator.pop(context); Navigator.pop(context);
} }
@ -343,8 +335,8 @@ void addPrescriptionForm(context, PrescriptionViewModel model) {
), ),
), ),
); );
}), });
); //);
}); });
} }

Loading…
Cancel
Save