Merge branch 'SOAP' into 'development'

Soap

See merge request Cloud_Solution/doctor_app_flutter!198
pull/200/head
Elham 5 years ago
commit 531a9f0545

@ -120,8 +120,9 @@ const GET_MASTER_LOOKUP_LIST =
'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies';
const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory';
const POST_CHIEF_COMPLAINT =
'Services/DoctorApplication.svc/REST/PostChiefcomplaint';
const POST_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/PostChiefcomplaint';
const POST_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/PostPhysicalExam';
const POST_PROGRESS_NOTE = '/Services/DoctorApplication.svc/REST/PostProgressNote';
var selectedPatientType = 1;
@ -179,8 +180,6 @@ const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true;
const PATIENT_OUT_SA = false;
const VIDA_AUTH =
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiMmI5ZTZlYmYtZmYzMC00ZmEyLTgwYjUtZGJlODM2MmZlNmNhIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1NzU3MTYiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwNzk3Mjk1MCwiZXhwIjoxNjA4ODM2OTUwLCJpYXQiOjE2MDc5NzI5NTB9.nHDltbMuIA3o4Gqa7mQ88fowDy6Oey9fG1zF45dumec';
/// Timer Info
const TIMER_MIN = 10;

@ -7,7 +7,9 @@ enum MasterKeysService {
HistorySurgical,
PhysicalExamination,
AllergySeverity,
physiotherapyGoals
physiotherapyGoals,
DiagnosisCondition,
DiagnosisType
}
extension SelectedMasterKeysService on MasterKeysService {
@ -40,6 +42,11 @@ extension SelectedMasterKeysService on MasterKeysService {
break;
case MasterKeysService.physiotherapyGoals:
return 117;
break;case MasterKeysService.DiagnosisCondition:
return 34;
break;
case MasterKeysService.DiagnosisType:
return 35;
break;
}
}

@ -4,6 +4,8 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart';
import 'base/lookup-service.dart';
@ -55,9 +57,33 @@ class SOAPService extends LookupService {
await baseAppClient.post(POST_CHIEF_COMPLAINT,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: postChiefComplaintRequestModel.toJson());
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: postChiefComplaintRequestModel.toJson());
}
Future postPhysicalExam(
PostPhysicalExamRequestModel postPhysicalExamRequestModel) async {
hasError = false;
await baseAppClient.post(POST_PHYSICAL_EXAM,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: postPhysicalExamRequestModel.toJson());
}
Future postProgressNote(
PostProgressNoteRequestModel postProgressNoteRequestModel) async {
hasError = false;
await baseAppClient.post(POST_PROGRESS_NOTE,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: postProgressNoteRequestModel.toJson());
}
}

@ -31,6 +31,8 @@ class LookupService extends BaseService {
List<MasterKeyModel> _physicalExaminationList = [];
// List<MasterKeyModel> listOfPhysiotherapyGoals = [];
List<MasterKeyModel> listOfDiagnosisType = [];
List<MasterKeyModel> listOfDiagnosisCondition = [];
Future getMasterLookup(MasterKeysService masterKeys) async {
hasError = false;
@ -103,6 +105,21 @@ class LookupService extends BaseService {
listOfPhysiotherapyGoals.add(MasterKeyModel.fromJson(v));
});
break;
case MasterKeysService.DiagnosisType:
listOfDiagnosisType.clear();
entryList.forEach((v) {
listOfDiagnosisType
.add(MasterKeyModel.fromJson(v));
});
break;
case MasterKeysService.DiagnosisCondition:
listOfDiagnosisCondition.clear();
entryList.forEach((v) {
listOfDiagnosisCondition
.add(MasterKeyModel.fromJson(v));
});
break;
}
}
}

@ -7,6 +7,8 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart';
import '../../locator.dart';
import 'base_view_model.dart';
@ -30,6 +32,8 @@ class SOAPViewModel extends BaseViewModel {
List<MasterKeyModel> get historySurgicalList => _SOAPService.historySurgicalList;
List<MasterKeyModel> get mergeHistorySurgicalWithHistorySportList => [...historySurgicalList,...historySportList];
List<MasterKeyModel> get physicalExaminationList => _SOAPService.physicalExaminationList;
List<MasterKeyModel> get listOfDiagnosisType => _SOAPService.listOfDiagnosisType;
List<MasterKeyModel> get listOfDiagnosisCondition => _SOAPService.listOfDiagnosisCondition;
@ -83,5 +87,25 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future postPhysicalExam(PostPhysicalExamRequestModel postPhysicalExamRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postPhysicalExam(postPhysicalExamRequestModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future postProgressNote(PostProgressNoteRequestModel postProgressNoteRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postProgressNote(postProgressNoteRequestModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
}

@ -0,0 +1,47 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class MySelectedAssessment {
MasterKeyModel selectedICD;
MasterKeyModel selectedDiagnosisCondition;
MasterKeyModel selectedDiagnosisType;
String remark;
int appointmentId;
MySelectedAssessment(
{this.selectedICD,
this.selectedDiagnosisCondition,
this.selectedDiagnosisType,
this.remark, this.appointmentId});
MySelectedAssessment.fromJson(Map<String, dynamic> json) {
selectedICD = json['selectedICD'] != null
? new MasterKeyModel.fromJson(json['selectedICD'])
: null;
selectedDiagnosisCondition = json['selectedDiagnosisCondition'] != null
? new MasterKeyModel.fromJson(json['selectedDiagnosisCondition'])
: null;
selectedDiagnosisType = json['selectedDiagnosisType'] != null
? new MasterKeyModel.fromJson(json['selectedDiagnosisType'])
: null;
remark = json['remark'];
appointmentId = json['appointmentId'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.selectedICD != null) {
data['selectedICD'] = this.selectedICD.toJson();
}
if (this.selectedDiagnosisCondition != null) {
data['selectedICD'] = this.selectedDiagnosisCondition.toJson();
}
if (this.selectedDiagnosisType != null) {
data['selectedICD'] = this.selectedDiagnosisType.toJson();
}
data['remark'] = this.remark;
data['appointmentId'] = this.appointmentId;
return data;
}
}

@ -1,31 +1,31 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class PostPhysicalExamRequestModel {
List<ListHisProgNotePhysicalVM> listHisProgNotePhysicalVM;
List<ListHisProgNotePhysicalExaminationVM> listHisProgNotePhysicalExaminationVM;
PostPhysicalExamRequestModel({this.listHisProgNotePhysicalVM});
PostPhysicalExamRequestModel({this.listHisProgNotePhysicalExaminationVM});
PostPhysicalExamRequestModel.fromJson(Map<String, dynamic> json) {
if (json['listHisProgNotePhysicalVM'] != null) {
listHisProgNotePhysicalVM = new List<ListHisProgNotePhysicalVM>();
json['listHisProgNotePhysicalVM'].forEach((v) {
listHisProgNotePhysicalVM
.add(new ListHisProgNotePhysicalVM.fromJson(v));
if (json['listHisProgNotePhysicalExaminationVM'] != null) {
listHisProgNotePhysicalExaminationVM = new List<ListHisProgNotePhysicalExaminationVM>();
json['listHisProgNotePhysicalExaminationVM'].forEach((v) {
listHisProgNotePhysicalExaminationVM
.add(new ListHisProgNotePhysicalExaminationVM.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.listHisProgNotePhysicalVM != null) {
data['listHisProgNotePhysicalVM'] =
this.listHisProgNotePhysicalVM.map((v) => v.toJson()).toList();
if (this.listHisProgNotePhysicalExaminationVM != null) {
data['listHisProgNotePhysicalExaminationVM'] =
this.listHisProgNotePhysicalExaminationVM.map((v) => v.toJson()).toList();
}
return data;
}
}
class ListHisProgNotePhysicalVM {
class ListHisProgNotePhysicalExaminationVM {
int episodeId;
int appointmentNo;
int examType;
@ -41,7 +41,7 @@ class ListHisProgNotePhysicalVM {
bool notExamined;
MasterKeyModel masterDescription;
ListHisProgNotePhysicalVM(
ListHisProgNotePhysicalExaminationVM(
{this.episodeId,
this.appointmentNo,
this.examType,
@ -57,7 +57,7 @@ class ListHisProgNotePhysicalVM {
this.notExamined,
this.masterDescription});
ListHisProgNotePhysicalVM.fromJson(Map<String, dynamic> json) {
ListHisProgNotePhysicalExaminationVM.fromJson(Map<String, dynamic> json) {
episodeId = json['episodeId'];
appointmentNo = json['appointmentNo'];
examType = json['examType'];

@ -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<String, dynamic> json) {
appointmentNo = json['AppointmentNo'];
episodeId = json['EpisodeId'];
patientMRN = json['PatientMRN'];
planNote = json['PlanNote'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['AppointmentNo'] = this.appointmentNo;
data['EpisodeId'] = this.episodeId;
data['PatientMRN'] = this.patientMRN;
data['PlanNote'] = this.planNote;
return data;
}
}

@ -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<PatiantInformtion> list;

@ -348,7 +348,8 @@ class Helpers {
String lang = await sharedPref.getString(APP_Language);
await clearSharedPref();
sharedPref.setString(APP_Language, lang);
// Navigator.of(AppGlobal.CONTEX).pushReplacementNamed(LOGIN);
Navigator.of(AppGlobal.CONTEX).popUntil((ModalRoute.withName(LOGIN)));
Navigator.of(AppGlobal.CONTEX).pushReplacementNamed(LOGIN);
// TODO Fix it
// Navigator.of(AppGlobal.CONTEX).popUntil((ModalRoute.withName(LOGIN)));
}
}

@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
@ -32,6 +33,7 @@ class _AddSOAPIndexState extends State<AddSOAPIndex>
List<MySelectedAllergy> myAllergiesList= List();
List<MasterKeyModel> myHistoryList = List();
List<MySelectedExamination> mySelectedExamination = List();
MySelectedAssessment mySelectedAssessment = new MySelectedAssessment();
changePageViewIndex(pageIndex) {
_controller.jumpToPage(pageIndex);
}
@ -108,10 +110,13 @@ class _AddSOAPIndexState extends State<AddSOAPIndex>
),
],
),
AppText(
"ALLERGIC TO: FOOD, ASPIRIN, EGG WHITE",
color: Color(0xFFB9382C),
fontWeight: FontWeight.bold,
Container(
width: MediaQuery.of(context).size.width *0.65,
child: AppText(
"ALLERGIC TO: FOOD, ASPIRIN, EGG WHITE",
color: Color(0xFFB9382C),
fontWeight: FontWeight.bold,
),
),
],
)
@ -156,7 +161,7 @@ class _AddSOAPIndexState extends State<AddSOAPIndex>
children: <Widget>[
SubjectivePage(changePageViewIndex: changePageViewIndex,myAllergiesList: myAllergiesList,myHistoryList: myHistoryList,),
ObjectivePage(changePageViewIndex: changePageViewIndex,mySelectedExamination:mySelectedExamination),
AssessmentPage(changePageViewIndex: changePageViewIndex,),
AssessmentPage(changePageViewIndex: changePageViewIndex,mySelectedAssessment:mySelectedAssessment),
PlanPage(changePageViewIndex: changePageViewIndex,)
],
),

@ -1,11 +1,16 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.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';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
@ -14,8 +19,10 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class AssessmentPage extends StatefulWidget {
final Function changePageViewIndex;
final MySelectedAssessment mySelectedAssessment;
AssessmentPage({Key key, this.changePageViewIndex});
AssessmentPage(
{Key key, this.changePageViewIndex, this.mySelectedAssessment});
@override
_AssessmentPageState createState() => _AssessmentPageState();
@ -33,61 +40,64 @@ class _AssessmentPageState extends State<AssessmentPage> {
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
return AppScaffold(
isShowAppBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
height: 30,
),
HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Texts('ASSESSMENT',
variant: isAssessmentExpand ? "bodyText" : '',
bold: isAssessmentExpand ? true : false,
color: Colors.black),
Icon(
FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor,
size: 12,
)
],
),
InkWell(
onTap: () {
setState(() {
isAssessmentExpand = !isAssessmentExpand;
});
},
child: Icon(isAssessmentExpand
? EvaIcons.minus
: EvaIcons.plus))
],
),
bodyWidget: Column(children: [
return BaseView<SOAPViewModel>(
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
height: 20,
height: 30,
),
Column(
children: [
Container(
margin: EdgeInsets.only(left: 5, right: 5, top: 15),
child: TextFields(
hintText: "Add ASSESSMENT",
fontSize: 13.5,
onTapTextFields: () {
openAssessmentDialog(context);
HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Texts('ASSESSMENT',
variant:
isAssessmentExpand ? "bodyText" : '',
bold: isAssessmentExpand ? true : false,
color: Colors.black),
Icon(
FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor,
size: 12,
)
],
),
InkWell(
onTap: () {
setState(() {
isAssessmentExpand = !isAssessmentExpand;
});
},
child: Icon(isAssessmentExpand
? EvaIcons.minus
: EvaIcons.plus))
],
),
bodyWidget: Column(children: [
SizedBox(
height: 20,
),
Column(
children: [
Container(
margin:
EdgeInsets.only(left: 5, right: 5, top: 15),
child: TextFields(
hintText: "Add ASSESSMENT",
fontSize: 13.5,
onTapTextFields: () {
openAssessmentDialog(context);
},
readOnly: true,
// hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline,
@ -96,184 +106,247 @@ class _AssessmentPageState extends State<AssessmentPage> {
// controller: messageController,
validator: (value) {
if (value == null)
return TranslationBase.of(context)
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 20,
),
if(widget.mySelectedAssessment != null &&
widget.mySelectedAssessment
.appointmentId !=
null && widget.mySelectedAssessment
.selectedDiagnosisType != null &&
widget.mySelectedAssessment
.selectedDiagnosisCondition != null)
Container(
margin: EdgeInsets.only(
left: 5, right: 5, top: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment
.spaceBetween,
crossAxisAlignment: CrossAxisAlignment
.start,
children: [
Column(
mainAxisAlignment: MainAxisAlignment
.start,
children: [
Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AppText(
"12".toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"DEC".toUpperCase(),
fontSize: 10,
color: Colors.grey,
),
],
)
],
),
Column(
crossAxisAlignment: CrossAxisAlignment
.start,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Appointment #: ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
widget.mySelectedAssessment
.appointmentId
.toString(),
fontSize: 10,
color: Colors.grey,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
widget.mySelectedAssessment
.selectedDiagnosisCondition
.nameEn,
fontWeight: FontWeight.bold,
fontSize: 16,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Type : ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
widget.mySelectedAssessment
.selectedDiagnosisType
.nameEn,
fontSize: 10,
color: Colors.grey,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Doc : ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"Anas Abdullah",
fontSize: 10,
color: Colors.grey,
),
],
),
SizedBox(
height: 6,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
SizedBox(
height: 6,
),
AppText(
"Some short remark about the allergy",
fontSize: 10,
color: Colors.grey,
),
],
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment
.start,
children: [
Row(
children: [
AppText(
"ICD: ".toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"R07.1".toUpperCase(),
fontSize: 10,
color: Colors.grey,
),
],
)
],
),
Column(
children: [
InkWell(
onTap: () {},
child: Icon(EvaIcons
.edit2Outline),
)
],
),
],
),
)
],
)
]),
isExpand: isAssessmentExpand,
),
DividerWithSpacesAround(
height: 30,
),
AppButton(
title: TranslationBase
.of(context)
.next,
onPressed: () {
widget.changePageViewIndex(3);
},
),
SizedBox(
height: 20,
height: 30,
),
Container(
margin: EdgeInsets.only(left: 5, right: 5, top: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AppText(
"12".toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"DEC".toUpperCase(),
fontSize: 10,
color: Colors.grey,
),
],
)
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Appointment #: ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"2019054946",
fontSize: 10,
color: Colors.grey,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Typhoid Fever",
fontWeight: FontWeight.bold,
fontSize: 16,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Type : ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"Possible Diagnosis",
fontSize: 10,
color: Colors.grey,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Doc : ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"Anas Abdullah",
fontSize: 10,
color: Colors.grey,
),
],
),
SizedBox(
height: 6,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
SizedBox(
height: 6,
),
AppText(
"Some short remark about the allergy",
fontSize: 10,
color: Colors.grey,
),
],
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
"ICD: ".toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"R07.1".toUpperCase(),
fontSize: 10,
color: Colors.grey,
),
],
)
],
),
Column(
children: [
InkWell(
onTap: () {},
child: Icon(EvaIcons.edit2Outline),
)
],
),
],
),
)
],
)
]),
isExpand: isAssessmentExpand,
),
DividerWithSpacesAround(
height: 30,
),
AppButton(
title: TranslationBase.of(context).next,
onPressed: () {
widget.changePageViewIndex(3);
},
),
SizedBox(
height: 30,
),
),
),
],
),
),
),
));
)));
}
openAssessmentDialog(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown) {
showModalBottomSheet(
backgroundColor: Colors.white,
isScrollControlled: true,
context: context,
builder: (context) {
return AddAssessmentDetails(
mySelectedAssessment: widget.mySelectedAssessment,
addSelectedAssessment: () {
setState(() {
Navigator.of(context).pop();
});
});
});
}
}
class AddAssessmentDetails extends StatefulWidget {
final MySelectedAssessment mySelectedAssessment;
final Function() addSelectedAssessment;
const AddAssessmentDetails(
{Key key, this.mySelectedAssessment, this.addSelectedAssessment})
: super(key: key);
@override
_AddAssessmentDetailsState createState() => _AddAssessmentDetailsState();
}
class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
MasterKeyModel _selectedDiagnosisCondition;
MasterKeyModel _selectedDiagnosisType;
TextEditingController remarkController = TextEditingController();
TextEditingController appointmentIdController = TextEditingController(
text: "234567");
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery
.of(context)
.size;
InputDecoration textFieldSelectorDecoration(String hintText,
String selectedText, bool isDropDown) {
//TODO: make one Input InputDecoration for all
return InputDecoration(
focusedBorder: OutlineInputBorder(
@ -296,199 +369,237 @@ class _AssessmentPageState extends State<AssessmentPage> {
),
);
}
showModalBottomSheet(
backgroundColor: Colors.white,
isScrollControlled: true,
context: context,
builder: (context) {
return FractionallySizedBox(
heightFactor: 0.75,
widthFactor: 0.9,
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 16,
),
AppText(
"Add Assessment Details".toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
),
SizedBox(
height: 16,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: assessmentList != null
? () {
ListSelectDialog dialog = ListSelectDialog(
list: assessmentList,
attributeName: 'name',
attributeValueId: 'id',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
return FractionallySizedBox(
heightFactor: 0.75,
child: BaseView<SOAPViewModel>(
onModelReady: (model) async {
if (model.listOfDiagnosisCondition.length == 0) {
await model.getMasterLookup(MasterKeysService.DiagnosisCondition);
}
if (model.listOfDiagnosisType.length == 0) {
await model.getMasterLookup(MasterKeysService.DiagnosisType);
}
},
builder: (_, model, w) =>
AppScaffold(
baseViewModel: model,
isShowAppBar: false,
body: SingleChildScrollView(
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 16,
),
AppText(
"Add Assessment Details".toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
),
SizedBox(
height: 16,
),
Container(
margin: EdgeInsets.only(
left: 0, right: 0, top: 15),
child: TextFields(
hintText: "Appointment Number",
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
readOnly: true,
controller: appointmentIdController,
validator: (value) {
if (value == null)
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.listOfDiagnosisCondition !=
null
? () {
MasterKeyDailog dialog = MasterKeyDailog(
list: model.listOfDiagnosisCondition,
okText: TranslationBase
.of(context)
.ok,
okFunction: (
MasterKeyModel selectedValue) {
setState(() {
_selectedDiagnosisCondition =
selectedValue;
widget.mySelectedAssessment
.selectedDiagnosisCondition =
selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
"Condition",
_selectedDiagnosisCondition != null
? _selectedDiagnosisCondition
.nameEn
: null,
true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.listOfDiagnosisCondition !=
null
? () {
MasterKeyDailog dialog = MasterKeyDailog(
list: model.listOfDiagnosisCondition,
okText: TranslationBase
.of(context)
.ok,
okFunction: (
MasterKeyModel selectedValue) {
setState(() {
_selectedDiagnosisCondition =
selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
"Condition",
_selectedDiagnosisCondition != null
? _selectedDiagnosisCondition
.nameEn
: null,
true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.listOfDiagnosisType != null
? () {
MasterKeyDailog dialog = MasterKeyDailog(
list: model.listOfDiagnosisType,
okText: TranslationBase
.of(context)
.ok,
okFunction: (
MasterKeyModel selectedValue) {
setState(() {
_selectedDiagnosisType =
selectedValue;
widget.mySelectedAssessment
.selectedDiagnosisType =
_selectedDiagnosisType;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
"Type",
_selectedDiagnosisType != null
? _selectedDiagnosisType.nameEn
: null,
true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(
left: 0, right: 0, top: 15),
child: TextFields(
hintText: "Remarks",
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 18,
minLines: 5,
controller: remarkController,
validator: (value) {
if (value == null)
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 10,
),
AppButton(
title: "Add".toUpperCase(),
onPressed: () {
setState(() {
// model.getDoctorBranch().then((value) {
// _selectedBranch = value;
// if (_referTo['id'] == 1) {
// model.getClinics(
// _selectedBranch['ID']);
// }
// });
widget.mySelectedAssessment.remark =
remarkController.text;
widget.mySelectedAssessment
.appointmentId = int.parse(
appointmentIdController.text);
widget.addSelectedAssessment();
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
"Appointment Number",
_referTo != null ? _referTo['name'] : null,
true),
enabled: false,
),
),
),
])),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: assessmentList != null
? () {
ListSelectDialog dialog = ListSelectDialog(
list: assessmentList,
attributeName: 'name',
attributeValueId: 'id',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration("Name or ICD",
_referTo != null ? _referTo['name'] : null, true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: assessmentList != null
? () {
ListSelectDialog dialog = ListSelectDialog(
list: assessmentList,
attributeName: 'name',
attributeValueId: 'id',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration("Condition",
_referTo != null ? _referTo['name'] : null, true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: assessmentList != null
? () {
ListSelectDialog dialog = ListSelectDialog(
list: assessmentList,
attributeName: 'name',
attributeValueId: 'id',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration("Type",
_referTo != null ? _referTo['name'] : null, true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(left: 0, right: 0, top: 15),
child: TextFields(
hintText: "Remarks",
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 18,
minLines: 8,
controller: remarksController,
validator: (value) {
if (value == null)
return TranslationBase.of(context).emptyMessage;
else
return null;
}),
),
SizedBox(
height: 10,
),
AppButton(
title: "Add".toUpperCase(),
onPressed: () {},
),
])),
);
});
),
))),
);
}
}

@ -1,9 +1,11 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_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';
@ -49,7 +51,9 @@ class _ObjectivePageState extends State<ObjectivePage> {
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
return AppScaffold(
return BaseView<SOAPViewModel>(
// onModelReady: (model) => model.getMasterLookup(MasterKeysService.Allergies),
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
@ -161,7 +165,12 @@ class _ObjectivePageState extends State<ObjectivePage> {
0.070,
decoration:
containerBorderDecoration(
Colors.white,
examination
.isNormal
? Color(
0xFF515A5D)
: Colors
.white,
Colors.grey),
child: Center(
child: Padding(
@ -173,17 +182,28 @@ class _ObjectivePageState extends State<ObjectivePage> {
style: TextStyle(
fontSize: 12,
color:
Colors.black,
examination
.isNormal
? Colors.white
: Colors
.black,
//Colors.black,
fontWeight:
FontWeight
.bold,
FontWeight
.bold,
),
),
),
)),
),
onTap: () {}),
onTap: () {
setState(() {
examination.isAbnormal =
!examination.isAbnormal;
examination.isNormal =
!examination.isNormal;
});
}),
SizedBox(
width: 12,
),
@ -191,33 +211,49 @@ class _ObjectivePageState extends State<ObjectivePage> {
child: Center(
child: Container(
height:
screenSize.height *
0.070,
screenSize.height *
0.070,
decoration:
containerBorderDecoration(
Color(0xFF515A5D),
Colors.black),
containerBorderDecoration(
examination
.isAbnormal
? Color(
0xFF515A5D)
: Colors
.white,
Colors.black),
child: Center(
child: Padding(
padding:
const EdgeInsets
.all(8.0),
const EdgeInsets
.all(8.0),
child: Text(
"Abnormal",
style: TextStyle(
fontSize: 12,
color:
Colors.white,
examination
.isAbnormal
? Colors.white
: Colors
.black,
//Colors.black,
fontWeight:
FontWeight
.bold,
FontWeight
.bold,
),
),
),
)),
),
onTap: () {}),
onTap: () {
setState(() {
examination.isAbnormal =
!examination.isAbnormal;
examination.isNormal =
!examination.isNormal;
});
}),
],
),
InkWell(
@ -268,10 +304,11 @@ class _ObjectivePageState extends State<ObjectivePage> {
DividerWithSpacesAround(height: 30,),
AppButton(
title: TranslationBase.of(context).next,
onPressed: () {
widget.changePageViewIndex(2);
},
),
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
await submitObjectivePage(model);
},
),
SizedBox(
height: 30,
),
@ -279,7 +316,48 @@ class _ObjectivePageState extends State<ObjectivePage> {
),
),
),
));
)));
}
submitObjectivePage(SOAPViewModel model) async {
if(widget.mySelectedExamination.isNotEmpty){
PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel();
widget.mySelectedExamination.forEach((exam) {
if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM ==
null)
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = [];
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add(
ListHisProgNotePhysicalExaminationVM(
patientMRN: 3120690,
episodeId: 200012117,
appointmentNo: 2016054573,
remarks: exam.remark ?? '',
createdBy: 1485,
createdOn: DateTime.now().toIso8601String(),
editedBy: 1485,
editedOn: DateTime.now().toIso8601String(),
examId: exam.selectedExamination.id,
examType: exam.selectedExamination.typeId,
isAbnormal: exam.isAbnormal,
isNormal: exam.isNormal,
masterDescription: exam.selectedExamination,
notExamined: false
));
});
await model.postPhysicalExam(postPhysicalExamRequestModel);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
}
}
// TODO move it back to else stat when it work.
widget.changePageViewIndex(2);
}
removeExamination(MasterKeyModel masterKey) {

@ -1,4 +1,9 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_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';
@ -25,7 +30,9 @@ class _PlanPageState extends State<PlanPage> {
List<dynamic> progressNoteList;
TextEditingController progressNoteController = TextEditingController();
TextEditingController progressNoteController =
TextEditingController(text: null);
BoxDecoration containerBorderDecoration(
Color containerColor, Color borderColor) {
return BoxDecoration(
@ -38,11 +45,14 @@ class _PlanPageState extends State<PlanPage> {
)),
);
}
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
return AppScaffold(
return BaseView<SOAPViewModel>(
// onModelReady: (model) => model.getMasterLookup(MasterKeysService.Allergies),
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
@ -98,7 +108,7 @@ class _PlanPageState extends State<PlanPage> {
hintText: "Add Progress Note",
fontSize: 13.5,
onTapTextFields: () {
openExaminationList(context);
openProgressNote(context);
},
readOnly: true,
// hintColor: Colors.black,
@ -108,7 +118,8 @@ class _PlanPageState extends State<PlanPage> {
// controller: messageController,
validator: (value) {
if (value == null)
return TranslationBase.of(context)
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
@ -117,104 +128,117 @@ class _PlanPageState extends State<PlanPage> {
SizedBox(
height: 20,
),
Container(
margin: EdgeInsets.only(left: 5, right: 5, top: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AppText(
"12".toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"DEC".toUpperCase(),
fontSize: 10,
color: Colors.grey,
),
],
)
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (progressNoteController.text.isNotEmpty)
Container(
margin:
EdgeInsets.only(left: 5, right: 5, top: 15),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AppText(
"12".toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"DEC".toUpperCase(),
fontSize: 10,
color: Colors.grey,
),
],
)
],
),
Column(
crossAxisAlignment: CrossAxisAlignment
.start,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
SizedBox(
height: 6,
),
Padding(
padding: const EdgeInsets.all(0.0),
child: Container(
width: MediaQuery
.of(context)
.size
.width * 0.6,
child: AppText(
progressNoteController.text,
fontSize: 10,
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
SizedBox(
height: 6,
),
Padding(
padding: const EdgeInsets.all(0.0),
child: AppText(
"Some progress note about",
color: Colors.grey,
),
),
),
],
), SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Created By : ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"Anas Abdullah on 12 De",
fontSize: 10,
color: Colors.grey,
),
),
],
),SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Created By : ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"Anas Abdullah on 12 De",
fontSize: 10,
color: Colors.grey,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Edited By : ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"Rahim on 13 Dec",
fontSize: 10,
color: Colors.grey,
),
],
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Edited By : ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"Rahim on 13 Dec",
fontSize: 10,
color: Colors.grey,
),
],
),
],
),
Column(
children: [
InkWell(
onTap: () {},
child: Icon(EvaIcons.edit2Outline),
)
],
),
],
),
)
],
),
Column(
children: [
InkWell(
onTap: () {
openProgressNote(context);
},
child: Icon(EvaIcons.edit2Outline),
)
],
),
],
),
)
],
)
]),
@ -222,9 +246,14 @@ class _PlanPageState extends State<PlanPage> {
),
DividerWithSpacesAround(height: 30,),
AppButton(
title: TranslationBase.of(context).next,
title: TranslationBase
.of(context)
.next,
loading: model.state == ViewState.BusyLocal,
onPressed: () {
widget.changePageViewIndex(2);
submitPlan(model);
// widget.changePageViewIndex(2);
},
),
SizedBox(
@ -234,36 +263,29 @@ class _PlanPageState extends State<PlanPage> {
),
),
),
));
),),);
}
openExaminationList(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),
borderRadius: BorderRadius.circular(8),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
hintText: selectedText != null ? selectedText : hintText,
suffixIcon: isDropDown ? Icon(Icons.arrow_drop_down) : null,
hintStyle: TextStyle(
fontSize: 14,
color: Colors.grey.shade600,
),
);
submitPlan(SOAPViewModel model) async {
if (progressNoteController.text.isNotEmpty) {
PostProgressNoteRequestModel postProgressNoteRequestModel = new PostProgressNoteRequestModel(
patientMRN: 3120690,
episodeId: 200012117,
appointmentNo: 2016054573,
planNote: progressNoteController.text);
await model.postProgressNote(postProgressNoteRequestModel);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
Navigator.of(context).pop();
}
}
}
;
openProgressNote(BuildContext context) {
showModalBottomSheet(
backgroundColor: Colors.white,
isScrollControlled: true,
@ -291,7 +313,7 @@ class _PlanPageState extends State<PlanPage> {
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 +322,9 @@ class _PlanPageState extends State<PlanPage> {
controller: progressNoteController,
validator: (value) {
if (value == null)
return TranslationBase.of(context).emptyMessage;
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
@ -310,6 +334,7 @@ class _PlanPageState extends State<PlanPage> {
AppButton(
title: "Add".toUpperCase(),
onPressed: () {
Navigator.of(context).pop();
},
),
]),

@ -140,7 +140,8 @@ class _SubjectivePageState extends State<SubjectivePage> {
SizedBox(
height: 20,
),
AddMedication(),
// TODO return it back when we need it.
// AddMedication(),
]),
),
isExpand: isChiefExpand,
@ -305,9 +306,9 @@ class _SubjectivePageState extends State<SubjectivePage> {
remarks: allergy.remark,
createdBy: 1485,
//
createdOn: "2020-08-14T20:37:22.780Z",
createdOn: DateTime.now().toIso8601String(),//"2020-08-14T20:37:22.780Z",
editedBy: 1485,
editedOn: "2020-08-14T20:37:22.780Z",
editedOn: DateTime.now().toIso8601String(),//"2020-08-14T20:37:22.780Z",
isChecked: false,
isUpdatedByNurse: false));
});

@ -7,14 +7,14 @@ packages:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "14.0.0"
version: "12.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "0.41.1"
version: "0.40.6"
archive:
dependency: transitive
description:
@ -112,7 +112,7 @@ packages:
name: build_web_compilers
url: "https://pub.dartlang.org"
source: hosted
version: "2.15.3"
version: "2.12.2"
built_collection:
dependency: transitive
description:
@ -475,7 +475,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.4"
version: "1.3.0-nullsafety.3"
mime:
dependency: transitive
description:
@ -732,7 +732,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.2"
version: "1.10.0-nullsafety.1"
stream_channel:
dependency: transitive
description:
@ -867,5 +867,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.11.0-162.0 <=2.11.0-213.1.beta"
dart: ">=2.10.0 <2.11.0"
flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save