do translation, fix some bugs

merge-requests/244/head
Elham Rababah 6 years ago
parent 175ba545e7
commit 0147e7e49b

@ -541,4 +541,5 @@ const Map<String, Map<String, String>> localizedValues = {
'physicalSystemExamination': {'en': "Physical/System Examination", 'ar':" الفحص البدني / النظام" }, 'physicalSystemExamination': {'en': "Physical/System Examination", 'ar':" الفحص البدني / النظام" },
'searchExamination': {'en': "Search Examination", 'ar':"فحص البحث" }, 'searchExamination': {'en': "Search Examination", 'ar':"فحص البحث" },
'addExamination': {'en': "Add Examination", 'ar':"اضافه" }, 'addExamination': {'en': "Add Examination", 'ar':"اضافه" },
'doc': {'en': "Doc :", 'ar':" د: " },
}; };

@ -246,6 +246,14 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
String getAllergicNames(){
String allergiesString='';
patientAllergiesList.forEach((element) {
allergiesString += element.allergyDiseaseName+' , ';
});
return allergiesString;
}
Future getPatientHistories(GetHistoryReqModel getHistoryReqModel, {bool isFirst = false}) async { Future getPatientHistories(GetHistoryReqModel getHistoryReqModel, {bool isFirst = false}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _SOAPService.getPatientHistories(getHistoryReqModel, isFirst: isFirst); await _SOAPService.getPatientHistories(getHistoryReqModel, isFirst: isFirst);

@ -558,6 +558,7 @@ class TranslationBase {
String get physicalSystemExamination => localizedValues['physicalSystemExamination'][locale.languageCode]; String get physicalSystemExamination => localizedValues['physicalSystemExamination'][locale.languageCode];
String get searchExamination => localizedValues['searchExamination'][locale.languageCode]; String get searchExamination => localizedValues['searchExamination'][locale.languageCode];
String get addExamination => localizedValues['addExamination'][locale.languageCode]; String get addExamination => localizedValues['addExamination'][locale.languageCode];
String get doc => localizedValues['doc'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -12,7 +12,6 @@ import 'package:flutter/material.dart';
class PatientPageHeaderWidget extends StatelessWidget { class PatientPageHeaderWidget extends StatelessWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
String allergiesString='';
PatientPageHeaderWidget(this.patient); PatientPageHeaderWidget(this.patient);
@override @override
@ -26,9 +25,7 @@ class PatientPageHeaderWidget extends StatelessWidget {
doctorID: '', doctorID: '',
editedBy: ''); editedBy: '');
await model.getPatientAllergy(generalGetReqForSOAP); await model.getPatientAllergy(generalGetReqForSOAP);
model.patientAllergiesList.forEach((element) {
allergiesString += element.allergyDiseaseName+' , ';
});
}, },
builder: (_, model, w) => Container( builder: (_, model, w) => Container(
child: Column( child: Column(
@ -85,11 +82,11 @@ class PatientPageHeaderWidget extends StatelessWidget {
), ),
NetworkBaseView( NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: AppText( child: model.patientAllergiesList.isNotEmpty ?AppText(
"ALLERGIC TO: $allergiesString", "ALLERGIC TO: "+model.getAllergicNames(),
color: Color(0xFFB9382C), color: Color(0xFFB9382C),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ) : AppText(''),
), ),
], ],
), ),

@ -94,7 +94,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).previewHealth, nameLine1: TranslationBase.of(context).previewHealth,
nameLine2: TranslationBase.of(context).summaryReport, nameLine2: TranslationBase.of(context).summaryReport,
icon: 'radiology-1.png'), icon: 'radiology-1.png'),
if (selectedPatientType != 0 && selectedPatientType != 5) if (selectedPatientType != 0 && selectedPatientType != 5 && selectedPatientType != 7)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,

@ -41,7 +41,6 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
bool isAssessmentExpand = false; bool isAssessmentExpand = false;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
return BaseView<SOAPViewModel>( return BaseView<SOAPViewModel>(
onModelReady: (model) async{ onModelReady: (model) async{
@ -152,12 +151,10 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
model: model); model: model);
}, },
readOnly: true, readOnly: true,
// hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline, suffixIcon: EvaIcons.plusCircleOutline,
suffixIconColor: AppGlobal suffixIconColor: AppGlobal
.appPrimaryColor, .appPrimaryColor,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
// controller: messageController,
validator: (value) { validator: (value) {
if (value == null) if (value == null)
return TranslationBase return TranslationBase
@ -217,7 +214,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
MainAxisAlignment.start, MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
"Appointment #: ", TranslationBase.of(context).appointmentNo,
fontWeight: FontWeight fontWeight: FontWeight
.bold, .bold,
fontSize: 16, fontSize: 16,
@ -250,7 +247,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
MainAxisAlignment.start, MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
"Type : ", TranslationBase.of(context).type +':',
fontWeight: FontWeight fontWeight: FontWeight
.bold, .bold,
fontSize: 16, fontSize: 16,
@ -270,7 +267,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
MainAxisAlignment.start, MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
"Doc : ", TranslationBase.of(context).doc,
fontWeight: FontWeight fontWeight: FontWeight
.bold, .bold,
fontSize: 16, fontSize: 16,
@ -671,7 +668,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
height: 10, height: 10,
), ),
AppButton( AppButton(
title: "Add".toUpperCase(), title: (widget.isUpdate?TranslationBase.of(context).update:TranslationBase.of(context).add).toUpperCase(),
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
onPressed: () async { onPressed: () async {
widget.mySelectedAssessment.remark = widget.mySelectedAssessment.remark =

@ -397,10 +397,10 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
widget.changePageViewIndex(2); widget.changePageViewIndex(2);
} }
} else { } else {
helpers.showErrorToast(TranslationBase.of(context).requiredMsg); widget.changePageViewIndex(2);
}
widget.changePageViewIndex(2); // helpers.showErrorToast(TranslationBase.of(context).requiredMsg);
}
} }
removeExamination(MasterKeyModel masterKey) { removeExamination(MasterKeyModel masterKey) {

@ -51,8 +51,6 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
return BaseView<SOAPViewModel>( return BaseView<SOAPViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
GetGetProgressNoteReqModel getGetProgressNoteReqModel = GetGetProgressNoteReqModel getGetProgressNoteReqModel =
@ -287,13 +285,13 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
appointmentNo: widget.patientInfo.appointmentNo, appointmentNo: widget.patientInfo.appointmentNo,
planNote: progressNoteController.text, doctorID: '', editedBy: ''); planNote: progressNoteController.text, doctorID: '', editedBy: '');
// if(model.patientProgressNoteList.isEmpty){ if(model.patientProgressNoteList.isEmpty){
await model.postProgressNote(postProgressNoteRequestModel); await model.postProgressNote(postProgressNoteRequestModel);
// }else { }else {
// await model.patchProgressNote(postProgressNoteRequestModel); await model.patchProgressNote(postProgressNoteRequestModel);
//
// } }
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);

Loading…
Cancel
Save