small fixes in progress note

merge-requests/241/head
Elham Rababah 4 years ago
parent 34b7b4564c
commit caddbdb53c

@ -5,7 +5,8 @@ class GetAssessmentReqModel {
String from; String from;
String to; String to;
int clinicID; int clinicID;
int doctorID; dynamic doctorID;
dynamic editedBy;
GetAssessmentReqModel( GetAssessmentReqModel(
{this.patientMRN, {this.patientMRN,
@ -14,6 +15,7 @@ class GetAssessmentReqModel {
this.from, this.from,
this.to, this.to,
this.clinicID, this.clinicID,
this.editedBy,
this.doctorID}); this.doctorID});
GetAssessmentReqModel.fromJson(Map<String, dynamic> json) { GetAssessmentReqModel.fromJson(Map<String, dynamic> json) {
@ -24,6 +26,7 @@ class GetAssessmentReqModel {
to = json['To']; to = json['To'];
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
editedBy = json['EditedBy'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -35,6 +38,7 @@ class GetAssessmentReqModel {
data['To'] = this.to; data['To'] = this.to;
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
data['EditedBy'] = this.editedBy;
return data; return data;
} }
} }

@ -5,7 +5,8 @@ class GetGetProgressNoteReqModel {
String from; String from;
String to; String to;
int clinicID; int clinicID;
int doctorID; dynamic doctorID;
dynamic editedBy;
GetGetProgressNoteReqModel( GetGetProgressNoteReqModel(
{this.patientMRN, {this.patientMRN,
@ -14,6 +15,7 @@ class GetGetProgressNoteReqModel {
this.from, this.from,
this.to, this.to,
this.clinicID, this.clinicID,
this.editedBy,
this.doctorID}); this.doctorID});
GetGetProgressNoteReqModel.fromJson(Map<String, dynamic> json) { GetGetProgressNoteReqModel.fromJson(Map<String, dynamic> json) {
@ -24,6 +26,8 @@ class GetGetProgressNoteReqModel {
to = json['To']; to = json['To'];
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
editedBy = json['EditedBy'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -35,6 +39,7 @@ class GetGetProgressNoteReqModel {
data['To'] = this.to; data['To'] = this.to;
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
data['EditedBy'] = this.editedBy;
return data; return data;
} }
} }

@ -9,6 +9,8 @@ class PostChiefComplaintRequestModel {
bool isLactation; bool isLactation;
int numberOfWeeks; int numberOfWeeks;
dynamic doctorID; dynamic doctorID;
dynamic editedBy;
PostChiefComplaintRequestModel( PostChiefComplaintRequestModel(
{this.appointmentNo, {this.appointmentNo,
@ -20,6 +22,7 @@ class PostChiefComplaintRequestModel {
this.ispregnant, this.ispregnant,
this.isLactation, this.isLactation,
this.doctorID, this.doctorID,
this.editedBy,
this.numberOfWeeks}); this.numberOfWeeks});
PostChiefComplaintRequestModel.fromJson(Map<String, dynamic> json) { PostChiefComplaintRequestModel.fromJson(Map<String, dynamic> json) {
@ -33,6 +36,7 @@ class PostChiefComplaintRequestModel {
isLactation = json['isLactation']; isLactation = json['isLactation'];
numberOfWeeks = json['numberOfWeeks']; numberOfWeeks = json['numberOfWeeks'];
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
editedBy = json['EditedBy'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -47,6 +51,7 @@ class PostChiefComplaintRequestModel {
data['isLactation'] = this.isLactation; data['isLactation'] = this.isLactation;
data['numberOfWeeks'] = this.numberOfWeeks; data['numberOfWeeks'] = this.numberOfWeeks;
data['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
data['EditedBy'] = this.editedBy;
return data; return data;
} }

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class PostPhysicalExamRequestModel { class PostPhysicalExamRequestModel {
List<ListHisProgNotePhysicalExaminationVM> listHisProgNotePhysicalExaminationVM; List<ListHisProgNotePhysicalExaminationVM> listHisProgNotePhysicalExaminationVM;

@ -3,15 +3,24 @@ class PostProgressNoteRequestModel {
int episodeId; int episodeId;
int patientMRN; int patientMRN;
String planNote; String planNote;
dynamic doctorID;
dynamic editedBy;
PostProgressNoteRequestModel( PostProgressNoteRequestModel(
{this.appointmentNo, this.episodeId, this.patientMRN, this.planNote}); {this.appointmentNo,
this.episodeId,
this.patientMRN,
this.planNote,
this.doctorID,
this.editedBy});
PostProgressNoteRequestModel.fromJson(Map<String, dynamic> json) { PostProgressNoteRequestModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['AppointmentNo']; appointmentNo = json['AppointmentNo'];
episodeId = json['EpisodeID']; episodeId = json['EpisodeID'];
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];
planNote = json['PlanNote']; planNote = json['PlanNote'];
doctorID = json['DoctorID'];
editedBy = json['EditedBy'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -20,6 +29,8 @@ class PostProgressNoteRequestModel {
data['EpisodeID'] = this.episodeId; data['EpisodeID'] = this.episodeId;
data['PatientMRN'] = this.patientMRN; data['PatientMRN'] = this.patientMRN;
data['PlanNote'] = this.planNote; data['PlanNote'] = this.planNote;
data['DoctorID'] = this.doctorID;
data['EditedBy'] = this.editedBy;
return data; return data;
} }
} }

@ -554,9 +554,11 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
isLactation: false, isLactation: false,
ispregnant: false, ispregnant: false,
doctorID: '', doctorID: '',
numberOfWeeks: 0); numberOfWeeks: 0);
if (model.patientChiefComplaintList.isEmpty) { if (model.patientChiefComplaintList.isEmpty) {
// TODO: make it postChiefComplaint after it start to work // TODO: make it postChiefComplaint after it start to work
postChiefComplaintRequestModel.editedBy='';
await model.postChiefComplaint(postChiefComplaintRequestModel); await model.postChiefComplaint(postChiefComplaintRequestModel);
} else { } else {
await model.patchChiefComplaint(postChiefComplaintRequestModel); await model.patchChiefComplaint(postChiefComplaintRequestModel);

@ -49,6 +49,8 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel( GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel(
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(), episodeID: widget.patientInfo.episodeNo.toString(),
editedBy: '',
doctorID: '',
appointmentNo: widget.patientInfo.appointmentNo); appointmentNo: widget.patientInfo.appointmentNo);
await model.getPatientAssessment(getAssessmentReqModel); await model.getPatientAssessment(getAssessmentReqModel);
if(model.patientAssessmentList.isNotEmpty){ if(model.patientAssessmentList.isNotEmpty){

@ -59,7 +59,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
GetGetProgressNoteReqModel( GetGetProgressNoteReqModel(
appointmentNo: widget.patientInfo.appointmentNo, appointmentNo: widget.patientInfo.appointmentNo,
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString()); episodeID: widget.patientInfo.episodeNo.toString(), editedBy: '', doctorID: '');
await model.getPatientProgressNote(getGetProgressNoteReqModel); await model.getPatientProgressNote(getGetProgressNoteReqModel);
if (model.patientProgressNoteList.isNotEmpty) { if (model.patientProgressNoteList.isNotEmpty) {
@ -285,15 +285,15 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo, episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo, appointmentNo: widget.patientInfo.appointmentNo,
planNote: progressNoteController.text); planNote: progressNoteController.text, doctorID: '', editedBy: '');
if(model.patientProgressNoteList.isEmpty){ // if(model.patientProgressNoteList.isEmpty){
await model.postProgressNote(postProgressNoteRequestModel); await model.postProgressNote(postProgressNoteRequestModel);
}else { // }else {
await model.patchProgressNote(postProgressNoteRequestModel); // await model.patchProgressNote(postProgressNoteRequestModel);
//
} // }
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);

Loading…
Cancel
Save