diff --git a/lib/models/SOAP/post_progress_note_request_model.dart b/lib/models/SOAP/post_progress_note_request_model.dart new file mode 100644 index 00000000..7bbea882 --- /dev/null +++ b/lib/models/SOAP/post_progress_note_request_model.dart @@ -0,0 +1,25 @@ +class PostProgressNoteRequestModel { + int appointmentNo; + int episodeId; + int patientMRN; + String planNote; + + PostProgressNoteRequestModel( + {this.appointmentNo, this.episodeId, this.patientMRN, this.planNote}); + + PostProgressNoteRequestModel.fromJson(Map json) { + appointmentNo = json['appointmentNo']; + episodeId = json['episodeId']; + patientMRN = json['patientMRN']; + planNote = json['planNote']; + } + + Map toJson() { + final Map data = new Map(); + data['appointmentNo'] = this.appointmentNo; + data['episodeId'] = this.episodeId; + data['patientMRN'] = this.patientMRN; + data['planNote'] = this.planNote; + return data; + } +} diff --git a/lib/models/patient/patiant_info_model.dart b/lib/models/patient/patiant_info_model.dart index 2b2fd876..9eec55ca 100644 --- a/lib/models/patient/patiant_info_model.dart +++ b/lib/models/patient/patiant_info_model.dart @@ -1,20 +1,3 @@ -import 'dart:convert'; - -//PatiantInformtion patiantInformtionFromJson(String str) => PatiantInformtion.fromJson(json.decode(str)); - -////String patiantInformtionToJson(PatiantInformtion data) => json.encode(data.toJson()); -//****************************** */ - -/* - *@author: Amjad Amireh - *@Date:27/4/2020 - *@param: - *@return:Patian information Model - - *@desc: - */ - - class PatiantInformtion { final List list; diff --git a/lib/widgets/patients/profile/SOAP/objective_page.dart b/lib/widgets/patients/profile/SOAP/objective_page.dart index 894f7745..922314b9 100644 --- a/lib/widgets/patients/profile/SOAP/objective_page.dart +++ b/lib/widgets/patients/profile/SOAP/objective_page.dart @@ -303,13 +303,12 @@ class _ObjectivePageState extends State { ), DividerWithSpacesAround(height: 30,), AppButton( - title: TranslationBase - .of(context) - .next, - onPressed: () async { - await submitObjectivePage(model); - }, - ), + title: TranslationBase.of(context).next, + loading: model.state == ViewState.BusyLocal, + onPressed: () async { + await submitObjectivePage(model); + }, + ), SizedBox( height: 30, ), diff --git a/lib/widgets/patients/profile/SOAP/plan_page.dart b/lib/widgets/patients/profile/SOAP/plan_page.dart index 7b5ddcdc..9bf907d9 100644 --- a/lib/widgets/patients/profile/SOAP/plan_page.dart +++ b/lib/widgets/patients/profile/SOAP/plan_page.dart @@ -1,4 +1,6 @@ import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; @@ -42,7 +44,9 @@ class _PlanPageState extends State { Widget build(BuildContext context) { final screenSize = MediaQuery.of(context).size; - return AppScaffold( + return BaseView( + // onModelReady: (model) => model.getMasterLookup(MasterKeysService.Allergies), + builder: (_, model, w) => AppScaffold( isShowAppBar: false, body: SingleChildScrollView( physics: ScrollPhysics(), @@ -98,7 +102,7 @@ class _PlanPageState extends State { hintText: "Add Progress Note", fontSize: 13.5, onTapTextFields: () { - openExaminationList(context); + openProgressNote(context); }, readOnly: true, // hintColor: Colors.black, @@ -159,10 +163,14 @@ class _PlanPageState extends State { ), Padding( padding: const EdgeInsets.all(0.0), - child: AppText( - "Some progress note about", - fontSize: 10, - color: Colors.grey, + child: Container( + width: MediaQuery.of(context).size.width * 0.6, + child: AppText( + progressNoteController.text, + fontSize: 10, + + color: Colors.grey, + ), ), ), ], @@ -207,7 +215,9 @@ class _PlanPageState extends State { Column( children: [ InkWell( - onTap: () {}, + onTap: () { + openProgressNote(context); + }, child: Icon(EvaIcons.edit2Outline), ) ], @@ -227,20 +237,22 @@ class _PlanPageState extends State { widget.changePageViewIndex(2); }, ), - SizedBox( - height: 30, + SizedBox( + height: 30, + ), + ], ), - ], + ), ), - ), - ), - )); + ),),); } - openExaminationList(BuildContext context) { - final screenSize = MediaQuery.of(context).size; - InputDecoration textFieldSelectorDecoration( - String hintText, String selectedText, bool isDropDown) { + openProgressNote(BuildContext context) { + final screenSize = MediaQuery + .of(context) + .size; + InputDecoration textFieldSelectorDecoration(String hintText, + String selectedText, bool isDropDown) { return InputDecoration( focusedBorder: OutlineInputBorder( borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), @@ -291,7 +303,7 @@ class _PlanPageState extends State { Container( margin: EdgeInsets.only(left: 0, right: 0, top: 15), child: TextFields( - hintText: "Remarks", + hintText: "Add progress note here", fontSize: 13.5, // hintColor: Colors.black, fontWeight: FontWeight.w600, @@ -300,7 +312,9 @@ class _PlanPageState extends State { controller: progressNoteController, validator: (value) { if (value == null) - return TranslationBase.of(context).emptyMessage; + return TranslationBase + .of(context) + .emptyMessage; else return null; }), @@ -310,6 +324,7 @@ class _PlanPageState extends State { AppButton( title: "Add".toUpperCase(), onPressed: () { + Navigator.of(context).pop(); }, ), ]),