Merge branch 'soap-objective-feature-re-design' into 'development'

Soap objective feature re design

See merge request Cloud_Solution/doctor_app_flutter!454
merge-requests/457/merge
Mohammad Aljammal 5 years ago
commit f6432d5f5d

@ -837,5 +837,10 @@ const Map<String, Map<String, String>> localizedValues = {
"enter_credentials": { "enter_credentials": {
"en": "Enter the user credentials below", "en": "Enter the user credentials below",
"ar": "أدخل بيانات اعتماد المستخدم أدناه" "ar": "أدخل بيانات اعتماد المستخدم أدناه"
},
"step": {
"en": "Step",
"ar": "خطوة"
}, },
}; };

@ -161,9 +161,12 @@ class AdmissionRequestService extends LookupService {
); );
} }
Future getDietTypesList() async { Future getDietTypesList(int patientMrn) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map();
body['patientMRN'] = patientMrn;
await baseAppClient.post( await baseAppClient.post(
GET_DIET_TYPES, GET_DIET_TYPES,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
@ -180,7 +183,7 @@ class AdmissionRequestService extends LookupService {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, },
body: Map(), body: body,
); );
} }

@ -101,12 +101,14 @@ class PatientReferralService extends LookupService {
); );
} }
Future getDoctorsList(String clinicId) async { Future getDoctorsList(String clinicId, int branchId) async {
hasError = false; hasError = false;
DoctorsByClinicIdRequest _doctorsByClinicIdRequest = DoctorsByClinicIdRequest _doctorsByClinicIdRequest =
DoctorsByClinicIdRequest(); DoctorsByClinicIdRequest();
_doctorsByClinicIdRequest.projectID = branchId;
_doctorsByClinicIdRequest.clinicID = clinicId; _doctorsByClinicIdRequest.clinicID = clinicId;
await baseAppClient.post( await baseAppClient.post(
PATIENT_GET_DOCTOR_BY_CLINIC_URL, PATIENT_GET_DOCTOR_BY_CLINIC_URL,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {

@ -114,9 +114,9 @@ class AdmissionRequestViewModel extends BaseViewModel{
} }
} }
Future getDietTypes() async { Future getDietTypes(int patientMrn) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _admissionRequestService.getDietTypesList(); await _admissionRequestService.getDietTypesList(patientMrn);
if (_admissionRequestService.hasError) { if (_admissionRequestService.hasError) {
error = _admissionRequestService.error; error = _admissionRequestService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -82,9 +82,9 @@ class PatientReferralViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getClinicDoctors(String clinicId) async { Future getClinicDoctors(String clinicId, int branchId) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _referralPatientService.getDoctorsList(clinicId); await _referralPatientService.getDoctorsList(clinicId, branchId);
if (_referralPatientService.hasError) { if (_referralPatientService.hasError) {
error = _referralPatientService.error; error = _referralPatientService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -32,6 +32,9 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
return BaseView<UcafViewModel>( return BaseView<UcafViewModel>(

@ -3,9 +3,12 @@ import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/page-stepper-widget.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.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_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -53,30 +56,65 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
return BaseView<UcafViewModel>( return BaseView<UcafViewModel>(
onModelReady: (model) => model.getUCAFData(patient), onModelReady: (model) => model.getUCAFData(patient),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType, arrivalType),
appBarTitle: TranslationBase.of(context).ucaf, appBarTitle: TranslationBase.of(context).ucaf,
body: model.patientVitalSigns != null && body: model.patientVitalSigns != null &&
model.patientChiefComplaintList != null && model.patientChiefComplaintList != null &&
model.patientChiefComplaintList.length > 0 model.patientChiefComplaintList.length > 0
? SingleChildScrollView( ? Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
PatientHeaderWidgetNoAvatar(patient), // PatientHeaderWidgetNoAvatar(patient),
Container( Container(
margin: margin: EdgeInsets.all(16.0),
EdgeInsets.symmetric(vertical: 16, horizontal: 16), child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).patient}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
),
AppText(
"${TranslationBase.of(context).ucaf}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
)
],
),
),
PageStepperWidget(
stepsCount: 2,
currentStepIndex: 1,
screenSize: screenSize,
),
Container(
margin: EdgeInsets.symmetric(
vertical: 0, horizontal: 16),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
CheckboxListTile( CheckboxListTile(
title: AppText( title: AppText(
TranslationBase.of(context).inPatient, TranslationBase.of(context).inPatient,
fontWeight: FontWeight.bold, fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.1, fontSize: SizeConfig.textMultiplier * 2.1,
), ),
value: _inPatient, value: _inPatient,
@ -85,13 +123,14 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
_inPatient = newValue; _inPatient = newValue;
}); });
}, },
controlAffinity: ListTileControlAffinity.leading, controlAffinity:
ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0), contentPadding: EdgeInsets.all(0),
), ),
CheckboxListTile( CheckboxListTile(
title: AppText( title: AppText(
TranslationBase.of(context).emergencyCase, TranslationBase.of(context).emergencyCase,
fontWeight: FontWeight.bold, fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.1, fontSize: SizeConfig.textMultiplier * 2.1,
), ),
value: _emergencyCase, value: _emergencyCase,
@ -100,47 +139,46 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
_emergencyCase = newValue; _emergencyCase = newValue;
}); });
}, },
controlAffinity: ListTileControlAffinity.leading, controlAffinity:
ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0), contentPadding: EdgeInsets.all(0),
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: TextField( hintText:
decoration: Helpers.textFieldSelectorDecoration( TranslationBase.of(context).durationOfIllness,
TranslationBase.of(context) dropDownText: "3",
.durationOfIllness, inputType: TextInputType.number,
null,
false),
enabled: true,
controller: _durationOfIllnessController,
inputFormatters: [ inputFormatters: [
FilteringTextInputFormatter.allow( FilteringTextInputFormatter.allow(
RegExp(ONLY_NUMBERS)) RegExp(ONLY_NUMBERS))
], ],
keyboardType: TextInputType.number, ),
)),
SizedBox( SizedBox(
height: 10, height: 16,
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
AppText( AppText(
"BP (H/L)", "BP (H/L)",
fontSize: SizeConfig.textMultiplier * 1.8, fontSize:
SizeConfig.textMultiplier * 1.8,
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w700, fontWeight: FontWeight.normal,
), ),
SizedBox( SizedBox(
width: 8, width: 8,
), ),
AppText( AppText(
"${model.patientVitalSigns.bloodPressureHigher}/${model.patientVitalSigns.bloodPressureLower}", "${model.patientVitalSigns.bloodPressureHigher}/${model.patientVitalSigns.bloodPressureLower}",
fontSize: SizeConfig.textMultiplier * 2, fontSize:
SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800, color: Colors.grey.shade800,
fontWeight: FontWeight.normal, fontWeight: FontWeight.w700,
), ),
], ],
), ),
@ -152,9 +190,10 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
children: [ children: [
AppText( AppText(
"${TranslationBase.of(context).temperature}", "${TranslationBase.of(context).temperature}",
fontSize: SizeConfig.textMultiplier * 1.8, fontSize:
SizeConfig.textMultiplier * 1.8,
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w700, fontWeight: FontWeight.normal,
), ),
SizedBox( SizedBox(
width: 8, width: 8,
@ -162,9 +201,10 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
Expanded( Expanded(
child: AppText( child: AppText(
"${model.patientVitalSigns.temperatureCelcius}(C), ${(model.patientVitalSigns.temperatureCelcius * (9 / 5) + 32).toStringAsFixed(2)}(F)", "${model.patientVitalSigns.temperatureCelcius}(C), ${(model.patientVitalSigns.temperatureCelcius * (9 / 5) + 32).toStringAsFixed(2)}(F)",
fontSize: SizeConfig.textMultiplier * 2, fontSize:
SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800, color: Colors.grey.shade800,
fontWeight: FontWeight.normal, fontWeight: FontWeight.w700,
), ),
), ),
], ],
@ -176,24 +216,27 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
height: 4, height: 4,
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
AppText( AppText(
"${TranslationBase.of(context).pulseBeats} :", "${TranslationBase.of(context).pulseBeats} :",
fontSize: SizeConfig.textMultiplier * 1.8, fontSize:
SizeConfig.textMultiplier * 1.8,
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w700, fontWeight: FontWeight.normal,
), ),
SizedBox( SizedBox(
width: 8, width: 8,
), ),
AppText( AppText(
"${model.patientVitalSigns.pulseBeatPerMinute}", "${model.patientVitalSigns.pulseBeatPerMinute}",
fontSize: SizeConfig.textMultiplier * 2, fontSize:
SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800, color: Colors.grey.shade800,
fontWeight: FontWeight.normal, fontWeight: FontWeight.w700,
), ),
], ],
), ),
@ -203,38 +246,35 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
height: 16, height: 16,
), ),
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context).chiefComplaintsAndSymptoms,
.chiefComplaintsAndSymptoms, fontFamily: 'Poppins',
fontWeight: FontWeight.bold, fontSize: SizeConfig.textMultiplier * 2.1,
fontSize: SizeConfig.textMultiplier * 2.5, fontWeight: FontWeight.w700,
), ),
SizedBox( SizedBox(
height: 8, height: 4,
), ),
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context)
.patientFeelsPainInHisBackAndCough, .patientFeelsPainInHisBackAndCough,
fontFamily: 'Poppins',
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0, fontSize: SizeConfig.textMultiplier * 1.8,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Container( AppTextFieldCustom(
child: TextField( hintText: TranslationBase.of(context).instruction,
decoration: Helpers.textFieldSelectorDecoration( dropDownText: helpers.parseHtmlString(model
TranslationBase.of(context)
.additionalTextComplaints,
helpers.parseHtmlString(model
.patientChiefComplaintList[0] .patientChiefComplaintList[0]
.chiefComplaint), .chiefComplaint),
false),
enabled: false,
controller: _additionalComplaintsController, controller: _additionalComplaintsController,
keyboardType: TextInputType.multiline, inputType: TextInputType.multiline,
enabled: false,
minLines: 1, minLines: 1,
maxLines: 20, maxLines: 20,
)), ),
SizedBox( SizedBox(
height: 16, height: 16,
), ),
@ -249,13 +289,15 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
title: AppText( title: AppText(
conditionsData[index]['name'], conditionsData[index]['name'],
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.1, fontSize:
SizeConfig.textMultiplier * 2.1,
), ),
value: conditionsData[index]['isChecked'], value: conditionsData[index]
['isChecked'],
onChanged: (newValue) { onChanged: (newValue) {
setState(() { setState(() {
conditionsData[index]['isChecked'] = conditionsData[index]
newValue; ['isChecked'] = newValue;
}); });
}, },
controlAffinity: controlAffinity:
@ -268,7 +310,8 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: TextField( child: TextField(
decoration: Helpers.textFieldSelectorDecoration( decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).other, TranslationBase.of(context).other,
null, null,
false), false),
@ -282,7 +325,8 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: TextField( child: TextField(
decoration: Helpers.textFieldSelectorDecoration( decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).how, TranslationBase.of(context).how,
null, null,
false), false),
@ -299,9 +343,10 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
child: Container( child: Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: TextField( child: TextField(
decoration: decoration: Helpers
Helpers.textFieldSelectorDecoration( .textFieldSelectorDecoration(
TranslationBase.of(context).when, TranslationBase.of(context)
.when,
null, null,
false), false),
enabled: true, enabled: true,
@ -316,9 +361,10 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
child: Container( child: Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: TextField( child: TextField(
decoration: decoration: Helpers
Helpers.textFieldSelectorDecoration( .textFieldSelectorDecoration(
TranslationBase.of(context).where, TranslationBase.of(context)
.where,
null, null,
false), false),
enabled: true, enabled: true,
@ -333,7 +379,8 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
), ),
Container( Container(
child: TextField( child: TextField(
decoration: Helpers.textFieldSelectorDecoration( decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context) TranslationBase.of(context)
.specifyPossibleLineManagement, .specifyPossibleLineManagement,
null, null,
@ -357,8 +404,10 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
), ),
Container( Container(
child: TextField( child: TextField(
decoration: Helpers.textFieldSelectorDecoration( decoration:
TranslationBase.of(context).backAbdomen, Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.backAbdomen,
null, null,
false), false),
enabled: true, enabled: true,
@ -367,23 +416,25 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
minLines: null, minLines: null,
maxLines: null, maxLines: null,
)), )),
SizedBox( ],
height: 16, ),
),
],
),
), ),
AppButton( ),
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: AppButton(
title: TranslationBase.of(context).next, title: TranslationBase.of(context).next,
color: HexColor("#B8382B"), color: HexColor("#D02127"),
onPressed: () { onPressed: () {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(PATIENT_UCAF_DETAIL,
PATIENT_UCAF_DETAIL,
arguments: {'patient': patient}); arguments: {'patient': patient});
}, },
), ),
],
),
), ),
], ],
),
) )
: Container( : Container(
child: Center( child: Center(

@ -0,0 +1,145 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class PageStepperWidget extends StatelessWidget {
final int stepsCount;
final int currentStepIndex;
final Size screenSize;
PageStepperWidget({this.stepsCount, this.currentStepIndex, this.screenSize});
@override
Widget build(BuildContext context) {
double dividerWidth = (screenSize.width / stepsCount) - (10 * stepsCount);
return Container(
margin: EdgeInsets.symmetric(vertical: 16.0, horizontal: 16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
for (int i = 1; i <= stepsCount; i++)
if (i == currentStepIndex)
StepWidget(i, true, i == stepsCount, i < currentStepIndex,
dividerWidth)
else
StepWidget(i, false, i == stepsCount, i < currentStepIndex,
dividerWidth)
],
)
],
),
);
}
}
class StepWidget extends StatelessWidget {
final int index;
final bool isInProgress;
final bool isFinalStep;
final bool isStepFinish;
final double dividerWidth;
StepWidget(this.index, this.isInProgress, this.isFinalStep, this.isStepFinish,
this.dividerWidth);
@override
Widget build(BuildContext context) {
StepStatus status;
if (isInProgress) {
status = StepStatus.InProgress;
} else {
if(isStepFinish){
status = StepStatus.Completed;
}else {
status = StepStatus.Locked;
}
}
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Container(
padding: EdgeInsets.all(0.0),
margin: EdgeInsets.symmetric(horizontal: 1),
width: 25,
height: 25,
decoration: BoxDecoration(
color: isInProgress ? Color(0xFFCC9B14) : Color(0xFFC9C9C9),
shape: BoxShape.circle,
border: Border.all(
color: isInProgress ? Color(0xFFCC9B14) : Color(0xFFC9C9C9),
width: 1),
),
child: Center(
child: Icon(
Icons.check,
size: 20,
color: status == StepStatus.InProgress ? Colors.white : status == StepStatus.Locked ? Colors.grey.shade800 : Color(0xFF359846),
)),
),
if (!isFinalStep)
Container(
width: dividerWidth,
height: 2,
color: Colors.grey,
),
],
),
SizedBox(
height: 8,
),
AppText(
"${TranslationBase.of(context).step} $index",
fontWeight: FontWeight.bold,
color: status == StepStatus.InProgress ? Colors.black : status == StepStatus.Locked ? Colors.grey : Color(0xFF359846),
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
),
Container(
margin: EdgeInsets.symmetric(vertical: 4),
padding: EdgeInsets.symmetric(horizontal: 4, vertical: 2),
decoration: BoxDecoration(
color: status == StepStatus.InProgress
? Color(0xFFF1E9D3)
: status == StepStatus.Locked
? Color(0xFFD8E8DB)
: Color(0xFFCCCCCC),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
border: Border.all(color: HexColor('#707070'), width: 0.30),
),
child: AppText(
status == StepStatus.InProgress
? "inProgress"
: status == StepStatus.Locked
? "Locked"
: "Completed",
fontWeight: FontWeight.bold,
textAlign: TextAlign.center,
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4,
color: status == StepStatus.InProgress
? Color(0xFFCC9B14)
: status == StepStatus.Locked
? Color(0xFF969696)
: Color(0xFF359846),
),
)
],
);
}
}
enum StepStatus {
InProgress,
Locked,
Completed,
}

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
@ -55,7 +56,9 @@ class _AdmissionRequestThirdScreenState
return BaseView<AdmissionRequestViewModel>( return BaseView<AdmissionRequestViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType, arrivalType),
appBarTitle: TranslationBase.of(context).admissionRequest, appBarTitle: TranslationBase.of(context).admissionRequest,
body: GestureDetector( body: GestureDetector(
onTap: () { onTap: () {
@ -72,9 +75,8 @@ class _AdmissionRequestThirdScreenState
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// PatientPageHeaderWidget(patient), // PatientProfileHeaderNewDesign(
PatientProfileHeaderNewDesign( // patient, patientType, arrivalType),
patient, patientType, arrivalType),
Container( Container(
margin: EdgeInsets.all(16.0), margin: EdgeInsets.all(16.0),
child: Column( child: Column(
@ -220,6 +222,7 @@ class _AdmissionRequestThirdScreenState
SizedBox( SizedBox(
height: 10, height: 10,
), ),
if(patient.gender != 1)
CheckboxListTile( CheckboxListTile(
title: AppText( title: AppText(
TranslationBase.of(context).patientPregnant, TranslationBase.of(context).patientPregnant,
@ -287,7 +290,7 @@ class _AdmissionRequestThirdScreenState
: () async { : () async {
GifLoaderDialogUtils.showMyDialog( GifLoaderDialogUtils.showMyDialog(
context); context);
await model.getDietTypes().then((_) => await model.getDietTypes(patient.patientId).then((_) =>
GifLoaderDialogUtils.hideDialog( GifLoaderDialogUtils.hideDialog(
context)); context));
if (model.state == ViewState.Idle && if (model.state == ViewState.Idle &&

@ -11,6 +11,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
@ -51,7 +52,9 @@ class _AdmissionRequestThirdScreenState
return BaseView<AdmissionRequestViewModel>( return BaseView<AdmissionRequestViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType, arrivalType),
appBarTitle: TranslationBase.of(context).admissionRequest, appBarTitle: TranslationBase.of(context).admissionRequest,
body: GestureDetector( body: GestureDetector(
onTap: () { onTap: () {
@ -67,8 +70,6 @@ class _AdmissionRequestThirdScreenState
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
PatientProfileHeaderNewDesign(
patient, patientType, arrivalType),
Container( Container(
margin: EdgeInsets.all(16.0), margin: EdgeInsets.all(16.0),
child: Column( child: Column(

@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
@ -63,7 +64,9 @@ class _AdmissionRequestSecondScreenState
return BaseView<AdmissionRequestViewModel>( return BaseView<AdmissionRequestViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType, arrivalType),
appBarTitle: TranslationBase.of(context).admissionRequest, appBarTitle: TranslationBase.of(context).admissionRequest,
body: GestureDetector( body: GestureDetector(
onTap: () { onTap: () {
@ -79,8 +82,8 @@ class _AdmissionRequestSecondScreenState
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
PatientProfileHeaderNewDesign( // PatientProfileHeaderNewDesign(
patient, patientType, arrivalType), // patient, patientType, arrivalType),
Container( Container(
margin: EdgeInsets.all(16.0), margin: EdgeInsets.all(16.0),
child: Column( child: Column(

@ -303,7 +303,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await model await model
.getClinicDoctors( .getClinicDoctors(
_selectedClinic['ClinicID'].toString()) _selectedClinic['ClinicID'].toString(), _selectedBranch['facilityId'])
.then((_) => .then((_) =>
GifLoaderDialogUtils.hideDialog(context)); GifLoaderDialogUtils.hideDialog(context));
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {

@ -1209,6 +1209,9 @@ class TranslationBase {
localizedValues['typeHereToReply'][locale.languageCode]; localizedValues['typeHereToReply'][locale.languageCode];
String get searchHere => localizedValues['searchHere'][locale.languageCode]; String get searchHere => localizedValues['searchHere'][locale.languageCode];
String get remove => localizedValues['remove'][locale.languageCode]; String get remove => localizedValues['remove'][locale.languageCode];
String get step => localizedValues['step'][locale.languageCode];
String get noSickLeave => localizedValues['no-sickleve'][locale.languageCode]; String get noSickLeave => localizedValues['no-sickleve'][locale.languageCode];
String get changeOfSchedule => String get changeOfSchedule =>
localizedValues['changeOfSchedule'][locale.languageCode]; localizedValues['changeOfSchedule'][locale.languageCode];

@ -15,9 +15,10 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType; final String patientType;
final String arrivalType; final String arrivalType;
final double height;
PatientProfileHeaderNewDesignAppBar( PatientProfileHeaderNewDesignAppBar(
this.patient, this.patientType, this.arrivalType); this.patient, this.patientType, this.arrivalType, {this.height = 0.0});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -36,7 +37,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
height: 200, height: height == 0 ? 200 : height,
child: Container( child: Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50), margin: EdgeInsets.only(top: 50),

@ -27,6 +27,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
final String invoiceNO; final String invoiceNO;
final String orderNo; final String orderNo;
final bool isPrescriptions; final bool isPrescriptions;
final String clinic; final String clinic;
PatientProfileHeaderWhitAppointmentAppBar( PatientProfileHeaderWhitAppointmentAppBar(
{this.patient, {this.patient,

@ -151,7 +151,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
arrivalType: arrivalType, arrivalType: arrivalType,
route: REFER_PATIENT_TO_DOCTOR, route: REFER_PATIENT_TO_DOCTOR,
isDisable: patient.patientStatusType != 43 ? true : false, isDisable: patient.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).myReferral, nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient, nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'), icon: 'patient/refer_patient.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (int.parse(patientType) == 7 || int.parse(patientType) == 6)

Loading…
Cancel
Save