Merge branch 'tasks-translation' into 'development'

medical dile & Order Procedure translation

See merge request Cloud_Solution/doctor_app_flutter!256
merge-requests/254/merge
Mohammad Aljammal 5 years ago
commit 9147cde86e

@ -587,14 +587,8 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "There is no detail for this patient",
'ar': "لا توجد تفاصيل لهذا المريض"
},
"systolic-lng": {
"en": "Systolic",
"ar": "الإنقباض"
},
"diastolic-lng": {
"en": "Diastolic",
"ar": "الإنبساط"
},
"systolic-lng": {"en": "Systolic", "ar": "الإنقباض"},
"diastolic-lng": {"en": "Diastolic", "ar": "الإنبساط"},
"mass": {"en": "Mass", "ar": "كتلة"},
"temp-c": {"en": "°C", "ar": "°س"},
"bpm": {"en": "bpm", "ar": "نبضة"},
@ -603,4 +597,24 @@ const Map<String, Map<String, String>> localizedValues = {
"body": {"en": "Body \n Mass", "ar": "كتلة\nالجسم"},
'respirationRate': {'en': 'Respiration Rate', 'ar': 'معدل التنفس'},
'heart': {'en': 'Heart', 'ar': 'قلب'},
'medicalReport': {'en': "medical Report", 'ar': "تقرير طبي"},
'visitDate': {'en': "Visit Date", 'ar': "تاريخ الزيارة"},
'test': {'en': "Procedures/Test", 'ar': "عمليات/تحاليل"},
'regular': {'en': "Regular", 'ar': "اعتيادي"},
'addMoreProcedure': {
'en': "Add More Procedures",
'ar': "اضف المزيد من العمليات"
},
'searchProcedures': {'en': "Search Procedures", 'ar': "البحث في العمليات"},
'selectProcedures': {'en': "Select procedure", 'ar': "اختر العملية"},
'procedureCategorise': {
'en': "Select Procedure Category",
'ar': "اختر صنف العمليات "
},
'addSelectedProcedures': {
'en': "add Selected Procedures",
'ar': "اضافة العمليات المختارة "
},
'updateProcedure': {'en': "Update Procedure", 'ar': "تحديث العملية"},
'orderProcedure': {'en': "order procedure", 'ar': "طلب العمليات"},
};

@ -116,7 +116,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
IsLoginForDoctorApp: true,
PatientOutSA: false);
return BaseView<DashboardViewModel>(
onModelReady: (model) => model.getDashboard(),
//onModelReady: (model) => model.getDashboard(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: false,

@ -66,7 +66,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
(BuildContext context, MedicalFileViewModel model, Widget child) =>
AppScaffold(
isShowAppBar: true,
appBarTitle: 'medical file'.toUpperCase(),
appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(),
body: NetworkBaseView(
baseViewModel: model,
child: SingleChildScrollView(
@ -141,7 +141,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
Row(
children: [
AppText(
'Visit Date : ',
TranslationBase.of(context).visitDate +
": ",
fontWeight: FontWeight.w700,
),
if (model.medicalFileList.length != 0 &&
@ -174,7 +175,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
Row(
children: [
AppText(
'Doctor : '.toUpperCase(),
TranslationBase.of(context).doctorName +
": ".toUpperCase(),
fontWeight: FontWeight.w700,
),
if (model.medicalFileList.length != 0 &&
@ -203,7 +205,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
Row(
children: [
AppText(
'Clinic : ',
TranslationBase.of(context).clinicName +
": ",
fontWeight: FontWeight.w700,
),
if (model.medicalFileList.length != 0 &&
@ -229,7 +232,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
Row(
children: [
AppText(
'Episode Number : ',
TranslationBase.of(context).episode +
": ",
fontWeight: FontWeight.w700,
),
if (model.medicalFileList.length != 0 &&
@ -277,7 +281,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
Row(
children: [
Texts(
'History of present illness'
TranslationBase.of(context)
.historyOfPresentIllness
.toUpperCase(),
variant: isHistoryExpand
? "bodyText"
@ -376,7 +381,10 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
children: [
Row(
children: [
Texts('assessment'.toUpperCase(),
Texts(
TranslationBase.of(context)
.assessment
.toUpperCase(),
variant: isAssessmentExpand
? "bodyText"
: '',
@ -554,7 +562,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
Row(
children: [
Texts(
'Test / procedures'
TranslationBase.of(context)
.test
.toUpperCase(),
variant: isProcedureExpand
? "bodyText"
@ -638,18 +647,22 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
),
Row(
children: [
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstProcedure[index]
.procName,
fontWeight:
FontWeight.w700,
Expanded(
child: AppText(
model
.medicalFileList[
0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstProcedure[
index]
.procName,
fontWeight:
FontWeight.w700,
),
)
],
),
@ -717,7 +730,10 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
children: [
Row(
children: [
Texts('physical exam'.toUpperCase(),
Texts(
TranslationBase.of(context)
.physicalSystemExamination
.toUpperCase(),
variant: isPhysicalExam
? "bodyText"
: '',

@ -27,7 +27,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
(BuildContext context, MedicalFileViewModel model, Widget child) =>
AppScaffold(
isShowAppBar: true,
appBarTitle: 'medical Report'.toUpperCase(),
appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(),
body: NetworkBaseView(
baseViewModel: model,
child: SingleChildScrollView(
@ -93,6 +93,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
if (model.medicalFileList.length != 0)
ListView.builder(
//physics: ,
physics: NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model
@ -108,7 +109,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Row(
children: [
AppText(
'Branch : ',
TranslationBase.of(context).branch +
": ",
fontWeight: FontWeight.w700,
),
AppText(model
@ -121,13 +123,19 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Row(
children: [
AppText(
'Doctor : '.toUpperCase(),
TranslationBase.of(context)
.doctorName
.toUpperCase() +
": ",
fontWeight: FontWeight.w700,
),
Expanded(
child: AppText(
model.medicalFileList[0].entityList[0]
.timelines[index].doctorName,
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName,
fontWeight: FontWeight.w700,
),
),
@ -136,7 +144,9 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Row(
children: [
AppText(
'Clinic : ',
TranslationBase.of(context)
.clinicName +
": ",
fontWeight: FontWeight.w700,
),
AppText(

@ -93,6 +93,7 @@ class PrescriptionFormWidget extends StatefulWidget {
}
class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
int selectedType;
TextEditingController durationController = TextEditingController();
TextEditingController strengthController = TextEditingController();
TextEditingController routeController = TextEditingController();
@ -127,6 +128,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
@override
void initState() {
super.initState();
selectedType = 1;
referToList = List();
strengthList = List();
routeList = List();
@ -252,6 +254,12 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
referToList.add(urgentOrder);
}
setSelectedType(int val) {
setState(() {
selectedType = val;
});
}
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
@ -344,10 +352,22 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: Row(
children: [
AppText('Order Type'),
Radio(),
Radio(
activeColor: Color(0xFFB9382C),
value: 0,
groupValue: selectedType,
onChanged: (value) {
setSelectedType(value);
},
),
Text('Regular'),
Radio(
activeColor: Color(0xFFB9382C),
groupValue: selectedType,
value: 1,
onChanged: (value) {
setSelectedType(value);
},
),
Text('Urgent'),
],

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart';
import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.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';
@ -61,7 +62,7 @@ class _EntityListCheckboxSearchWidgetState
child: ListView(
children: [
TextFields(
hintText: 'Search Procedure',
hintText: TranslationBase.of(context).searchProcedures,
suffixIcon: EvaIcons.search,
onChanged: (value) {
filterSearchResults(value);

@ -33,8 +33,15 @@ class ProcedureScreen extends StatefulWidget {
}
class _ProcedureScreenState extends State<ProcedureScreen> {
int selectedType = 0;
int testNum = 1;
PatiantInformtion patient;
setSelectedType(int val) {
setState(() {
selectedType = val;
});
}
TextEditingController procedureController = TextEditingController();
@override
Widget build(BuildContext context) {
@ -45,7 +52,7 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
AppScaffold(
isShowAppBar: true,
appBarTitle: 'ORDER PROCEDURE',
appBarTitle: TranslationBase.of(context).orderProcedure,
body: NetworkBaseView(
baseViewModel: model,
child: SingleChildScrollView(
@ -199,7 +206,8 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
.spaceBetween,
children: [
AppText(
' Add more procedure',
TranslationBase.of(context)
.addMoreProcedure,
fontWeight: FontWeight.w100,
fontSize: 12.5,
),
@ -275,7 +283,10 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
Row(
children: [
AppText(
'Code #: ',
TranslationBase.of(
context)
.codeNo +
" : ",
fontWeight:
FontWeight
.w700,
@ -297,7 +308,10 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
width: 12.0,
),
AppText(
'Order Type: ',
TranslationBase.of(
context)
.orderType +
" : ",
fontWeight:
FontWeight
.w700,
@ -312,8 +326,8 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
: 'Urgent',
fontSize:
13.0,
color: Colors
.red,
color: Color(
0xFFB9382C),
),
],
),
@ -342,7 +356,10 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
Row(
children: [
AppText(
'Price: ',
TranslationBase.of(
context)
.price +
" : ",
fontWeight:
FontWeight
.w700,
@ -409,6 +426,12 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
onTap: () {
updateProcedureForm(
context,
remarks: model
.procedureList[
0]
.entityList[
index]
.remarks,
procedureName: model
.procedureList[
0]
@ -452,6 +475,109 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
)),
);
}
void updateProcedureForm(context,
{String procedureName,
PatiantInformtion patient,
String procedureId,
String remarks,
String categoreId}) {
ProcedureViewModel model = ProcedureViewModel();
TextEditingController remarksController = TextEditingController();
TextEditingController orderController = TextEditingController();
showModalBottomSheet(
context: context,
isScrollControlled: true,
builder: (BuildContext bc) {
return Container(
height: MediaQuery.of(context).size.height * 0.55,
child: Form(
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
procedureName.toUpperCase(),
fontWeight: FontWeight.w700,
),
SizedBox(
height: 30.0,
),
Container(
child: Row(
children: [
AppText(TranslationBase.of(context).orderType),
Radio(
activeColor: Color(0xFFB9382C),
value: 0,
groupValue: selectedType,
onChanged: (value) {
setSelectedType(value);
},
),
Text(TranslationBase.of(context).regular),
Radio(
activeColor: Color(0xFFB9382C),
groupValue: selectedType,
value: 1,
onChanged: (value) {
setSelectedType(value);
},
),
Text(TranslationBase.of(context).urgent),
],
),
),
SizedBox(
height: 12.0,
),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: remarks,
controller: remarksController,
maxLines: 5,
minLines: 3,
),
),
SizedBox(
height: 100.0,
),
Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 2),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: TranslationBase.of(context)
.updateProcedure
.toUpperCase(),
onPressed: () {
Navigator.pop(context);
updateProcedure(
categorieId: categoreId,
procedureId: procedureId,
patient: patient,
model: model,
remarks: remarksController.text);
// authorizationForm(context);
},
),
],
),
),
],
),
),
));
});
}
}
postProcedure(
@ -553,6 +679,7 @@ class AddSelectedProcedure extends StatefulWidget {
}
class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
int selectedType;
ProcedureViewModel model;
PatiantInformtion patient;
_AddSelectedProcedureState({this.patient, this.model});
@ -560,6 +687,12 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
TextEditingController remarksController = TextEditingController();
List<EntityList> entityList = List();
dynamic selectedCategory;
setSelectedType(int val) {
setState(() {
selectedType = val;
});
}
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
@ -582,11 +715,13 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
'Search Procedure Category'.toUpperCase(),
TranslationBase.of(context)
.selectProcedures
.toUpperCase(),
fontWeight: FontWeight.w900,
),
SizedBox(
height: 5.0,
height: 10.0,
),
Container(
height: screenSize.height * 0.070,
@ -620,7 +755,8 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
'Procedure Categorey',
TranslationBase.of(context)
.procedureCategorise,
selectedCategory != null
? selectedCategory['categoryName']
: null,
@ -665,21 +801,36 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: 'Order Type'.toUpperCase(),
controller: procedureController,
child: Row(
children: [
AppText(
TranslationBase.of(context).orderType),
Radio(
activeColor: Color(0xFFB9382C),
value: 0,
groupValue: selectedType,
onChanged: (value) {
setSelectedType(value);
},
),
Text(TranslationBase.of(context).regular),
Radio(
activeColor: Color(0xFFB9382C),
groupValue: selectedType,
value: 1,
onChanged: (value) {
setSelectedType(value);
},
),
Text(TranslationBase.of(context).urgent),
],
),
),
SizedBox(
height: 15.0,
),
TextFields(
hintText: 'Remarks',
hintText: TranslationBase.of(context).remarks,
controller: remarksController,
minLines: 3,
maxLines: 5,
@ -694,8 +845,8 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title:
'add Selected Procedures'.toUpperCase(),
title: TranslationBase.of(context)
.addSelectedProcedures,
onPressed: () {
Navigator.pop(context);
postProcedure(
@ -761,86 +912,3 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
);
}
}
void updateProcedureForm(context,
{String procedureName,
PatiantInformtion patient,
String procedureId,
String categoreId}) {
ProcedureViewModel model = ProcedureViewModel();
TextEditingController remarksController = TextEditingController();
TextEditingController orderController = TextEditingController();
showModalBottomSheet(
context: context,
isScrollControlled: true,
builder: (BuildContext bc) {
return Container(
height: MediaQuery.of(context).size.height * 0.55,
child: Form(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
procedureName.toUpperCase(),
fontWeight: FontWeight.w700,
),
SizedBox(
height: 30.0,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: 'Order ',
controller: orderController,
),
),
SizedBox(
height: 12.0,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: 'Remarks',
controller: remarksController,
maxLines: 5,
minLines: 3,
),
),
SizedBox(
height: 100.0,
),
Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 2),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: 'Update procedure'.toUpperCase(),
onPressed: () {
Navigator.pop(context);
updateProcedure(
categorieId: categoreId,
procedureId: procedureId,
patient: patient,
model: model,
remarks: remarksController.text);
// authorizationForm(context);
},
),
],
),
),
],
),
),
));
});
}

@ -612,8 +612,10 @@ class TranslationBase {
String get doc => localizedValues['doc'][locale.languageCode];
String get patientNoDetailErrMsg =>
localizedValues['patientNoDetailErrMsg'][locale.languageCode];
String get systolicLng => localizedValues['systolic-lng'][locale.languageCode];
String get diastolicLng => localizedValues['diastolic-lng'][locale.languageCode];
String get systolicLng =>
localizedValues['systolic-lng'][locale.languageCode];
String get diastolicLng =>
localizedValues['diastolic-lng'][locale.languageCode];
String get mass => localizedValues['mass'][locale.languageCode];
String get tempC => localizedValues['temp-c'][locale.languageCode];
String get bpm => localizedValues['bpm'][locale.languageCode];
@ -624,6 +626,26 @@ class TranslationBase {
String get respirationRate =>
localizedValues['respirationRate'][locale.languageCode];
String get heart => localizedValues['heart'][locale.languageCode];
String get medicalReport =>
localizedValues['medicalReport'][locale.languageCode];
String get visitDate => localizedValues['visitDate'][locale.languageCode];
String get test => localizedValues['test'][locale.languageCode];
String get addMoreProcedure =>
localizedValues['addMoreProcedure'][locale.languageCode];
String get regular => localizedValues['regular'][locale.languageCode];
String get searchProcedures =>
localizedValues['searchProcedures'][locale.languageCode];
String get procedureCategorise =>
localizedValues['procedureCategorise'][locale.languageCode];
String get selectProcedures =>
localizedValues['selectProcedures'][locale.languageCode];
String get addSelectedProcedures =>
localizedValues['addSelectedProcedures'][locale.languageCode];
String get updateProcedure =>
localizedValues['updateProcedure'][locale.languageCode];
String get orderProcedure =>
localizedValues['orderProcedure'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -27,11 +27,11 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
ProfileMedicalInfoWidget(
{Key key, this.patient, this.patientType, this.from, this.to});
PatiantInformtion patient;
String patientType;
String from;
String to;
PatiantInformtion patient;
String patientType;
@override
Widget build(BuildContext context) {
return BaseView<SOAPViewModel>(
@ -78,7 +78,10 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
to: to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS /*PATIENT_VITAL_SIGN*/,
route:
VITAL_SIGN_DETAILS /* PATIENT_VITAL_SIGN
*/
,
icon: 'heartbeat.png'),
if (selectedPatientType != 7)
PatientProfileButton(
@ -117,15 +120,15 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
key: key,
patient: patient,
route: ORDER_PRESCRIPTION,
nameLine1: 'Order',
nameLine2: 'Prescription',
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'lab.png'),
PatientProfileButton(
key: key,
patient: patient,
route: ORDER_PROCEDURE,
nameLine1: 'Order Test',
nameLine2: 'Or Procedures',
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'lab.png'),
if (selectedPatientType == 7)
PatientProfileButton(

@ -510,7 +510,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.2"
version: "0.6.3-nullsafety.1"
json_annotation:
dependency: transitive
description:

Loading…
Cancel
Save