add fixes on episode

merge-requests/773/head
Elham Rababh 5 years ago
parent eabe16a1d3
commit b015cb06f7

@ -372,7 +372,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
), ),
), ),
), ),
bottomSheet: Container( bottomSheet: model.state == ViewState.Busy?Container(height: 0,):Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(

@ -71,6 +71,38 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
} }
} }
getPatientProgressNote(model, {bool isAddProgress = false}) async {
GetGetProgressNoteReqModel getGetProgressNoteReqModel =
GetGetProgressNoteReqModel(
appointmentNo:
int.parse(widget.patientInfo.appointmentNo.toString()),
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(),
editedBy: '',
doctorID: '');
await model.getPatientProgressNote(getGetProgressNoteReqModel);
if (model.patientProgressNoteList.isNotEmpty) {
progressNoteController.text = Helpers.parseHtmlString(
model.patientProgressNoteList[0].planNote);
patientProgressNote.planNote = progressNoteController.text;
patientProgressNote.createdByName =
model.patientProgressNoteList[0].createdByName;
patientProgressNote.createdOn =
model.patientProgressNoteList[0].createdOn;
patientProgressNote.editedOn =
model.patientProgressNoteList[0].editedOn;
patientProgressNote.editedByName =
model.patientProgressNoteList[0].editedByName;
patientProgressNote.appointmentNo =
model.patientProgressNoteList[0].appointmentNo;
setState(() {
isAddProgress = isAddProgress;
});
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<SOAPViewModel>( return BaseView<SOAPViewModel>(
@ -210,22 +242,22 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
), ),
Row( Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.end,
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Row( // Row(
children: [ // children: [
AppText( // AppText(
'Condition: ', // 'Condition: ',
fontSize: 12, // fontSize: 12,
), // ),
AppText( // AppText(
patientProgressNote.mName ?? // patientProgressNote.mName ??
'', // '',
fontWeight: FontWeight.w600), // fontWeight: FontWeight.w600),
], // ],
), // ),
AppText( AppText(
patientProgressNote.createdOn != patientProgressNote.createdOn !=
null null
@ -326,21 +358,6 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
onPressed: () async { onPressed: () async {
if (progressNoteController.text.isNotEmpty) { if (progressNoteController.text.isNotEmpty) {
if (isAddProgress) { if (isAddProgress) {
Map profile =
await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile =
DoctorProfileModel.fromJson(profile);
setState(() {
patientProgressNote.createdByName =
patientProgressNote.createdByName ??
doctorProfile.doctorName;
patientProgressNote.editedByName =
doctorProfile.doctorName;
patientProgressNote.createdOn =
DateTime.now().toString();
patientProgressNote.planNote =
progressNoteController.text;
});
submitPlan(model); submitPlan(model);
} else { } else {
Navigator.of(context).pop(); Navigator.of(context).pop();
@ -391,10 +408,35 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error); Helpers.showErrorToast(model.error);
} else { } else {
setState(() {
isAddProgress = !isAddProgress;
}); GetGetProgressNoteReqModel getGetProgressNoteReqModel =
GetGetProgressNoteReqModel(
appointmentNo:
int.parse(widget.patientInfo.appointmentNo.toString()),
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(),
editedBy: '',
doctorID: '');
await model.getPatientProgressNote(getGetProgressNoteReqModel);
if (model.patientProgressNoteList.isNotEmpty) {
progressNoteController.text = Helpers.parseHtmlString(
model.patientProgressNoteList[0].planNote);
patientProgressNote.planNote = progressNoteController.text;
patientProgressNote.createdByName =
model.patientProgressNoteList[0].createdByName;
patientProgressNote.createdOn =
model.patientProgressNoteList[0].createdOn;
patientProgressNote.editedOn =
model.patientProgressNoteList[0].editedOn;
patientProgressNote.editedByName =
model.patientProgressNoteList[0].editedByName;
patientProgressNote.appointmentNo =
model.patientProgressNoteList[0].appointmentNo;
setState(() {
isAddProgress = false;
});
}
} }
widget.changeLoadingState(false); widget.changeLoadingState(false);
} else { } else {

@ -159,6 +159,9 @@ class _AddAllergiesItemState extends State<AddAllergiesItem> {
maxLines: 25, maxLines: 25,
minLines: 3, minLines: 3,
hasBorder: true, hasBorder: true,
onChanged: (value){
mySelectedAllergy.remark = value;
},
inputType: TextInputType.multiline, inputType: TextInputType.multiline,
), ),

@ -188,6 +188,7 @@ class _AddMedicationState extends State<AddMedication> {
list: model.medicationDoseTimeList, list: model.medicationDoseTimeList,
okText: okText:
TranslationBase.of(context).ok, TranslationBase.of(context).ok,
selectedValue: _selectedMedicationDose,
okFunction: (selectedValue) { okFunction: (selectedValue) {
setState(() { setState(() {
_selectedMedicationDose = _selectedMedicationDose =
@ -236,6 +237,7 @@ class _AddMedicationState extends State<AddMedication> {
list: model.medicationStrengthList, list: model.medicationStrengthList,
okText: okText:
TranslationBase.of(context).ok, TranslationBase.of(context).ok,
selectedValue: _selectedMedicationStrength,
okFunction: (selectedValue) { okFunction: (selectedValue) {
setState(() { setState(() {
_selectedMedicationStrength = _selectedMedicationStrength =
@ -284,6 +286,7 @@ class _AddMedicationState extends State<AddMedication> {
MasterKeyDailog dialog = MasterKeyDailog dialog =
MasterKeyDailog( MasterKeyDailog(
list: model.medicationRouteList, list: model.medicationRouteList,
selectedValue: _selectedMedicationRoute,
okText: okText:
TranslationBase.of(context).ok, TranslationBase.of(context).ok,
okFunction: (selectedValue) { okFunction: (selectedValue) {
@ -333,6 +336,7 @@ class _AddMedicationState extends State<AddMedication> {
list: model.medicationFrequencyList, list: model.medicationFrequencyList,
okText: okText:
TranslationBase.of(context).ok, TranslationBase.of(context).ok,
selectedValue: _selectedMedicationFrequency,
okFunction: (selectedValue) { okFunction: (selectedValue) {
setState(() { setState(() {
_selectedMedicationFrequency = _selectedMedicationFrequency =

Loading…
Cancel
Save