do translation, fix some bugs

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save