fix referral patient issue

merge-requests/254/head
Elham Rababah 5 years ago
parent 1f2aebde33
commit 6bab2e0b2d

@ -546,4 +546,7 @@ const Map<String, Map<String, String>> localizedValues = {
'ar': "لا توجد تفاصيل لهذا المريض" 'ar': "لا توجد تفاصيل لهذا المريض"
}, },
'doc': {'en': "Doc :", 'ar':" د: " }, 'doc': {'en': "Doc :", 'ar':" د: " },
'allergicTO': {'en': "ALLERGIC TO ", 'ar':" حساس من" },
'normal': {'en': "Normal", 'ar':"عادي" },
'abnormal': {'en': "Abnormal", 'ar':" غير عادي" },
}; };

@ -246,10 +246,15 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
String getAllergicNames(){ String getAllergicNames(isArabic) {
String allergiesString=''; String allergiesString = '';
patientAllergiesList.forEach((element) { patientAllergiesList.forEach((element) {
allergiesString += element.allergyDiseaseName+' , '; MasterKeyModel selectedAllergy = getOneMasterKey(
masterKeys: MasterKeysService.Allergies,
id: element.allergyDiseaseId,
typeId: element.allergyDiseaseType);
allergiesString +=
(isArabic ? selectedAllergy.nameAr : selectedAllergy.nameEn )+ ' , ';
}); });
return allergiesString; return allergiesString;
} }

@ -135,14 +135,14 @@ class PatiantInformtion {
description: json["Description"]?? json["description"], description: json["Description"]?? json["description"],
clinicDescription: json["ClinicDescription"]?? json["clinicDescription"], clinicDescription: json["ClinicDescription"]?? json["clinicDescription"],
clinicDescriptionN: json["ClinicDescriptionN"]?? json["clinicDescriptionN"], clinicDescriptionN: json["ClinicDescriptionN"]?? json["clinicDescriptionN"],
nationalityName: json["NationalityName"]?? json["nationalityName"], nationalityName: json["NationalityName"]?? json["nationalityName"]??json['NationalityName'],
nationalityNameN: json["NationalityNameN"]?? json["nationalityNameN"], nationalityNameN: json["NationalityNameN"]?? json["nationalityNameN"]??json['NationalityNameN'],
age: json["Age"]?? json["age"], age: json["Age"]?? json["age"],
genderDescription: json["GenderDescription"], genderDescription: json["GenderDescription"],
nursingStationName: json["NursingStationName"], nursingStationName: json["NursingStationName"],
appointmentDate: json["AppointmentDate"]?? '', appointmentDate: json["AppointmentDate"]?? '',
startTime: json["StartTime"], startTime: json["StartTime"],
appointmentNo :json['appointmentNo'], appointmentNo :json['appointmentNo'] ?? json['AppointmentNo'],
appointmentType :json['appointmentType'], appointmentType :json['appointmentType'],
arrivedOn :json['arrivedOn'], arrivedOn :json['arrivedOn'],
clinicGroupId :json['clinicGroupId'], clinicGroupId :json['clinicGroupId'],
@ -150,12 +150,12 @@ class PatiantInformtion {
dischargeStatus :json['dischargeStatus'], dischargeStatus :json['dischargeStatus'],
doctorDetails :json['doctorDetails'], doctorDetails :json['doctorDetails'],
endTime :json['endTime'], endTime :json['endTime'],
episodeNo :json['episodeNo'], episodeNo :json['episodeNo'] ?? json['EpisodeID'],
fallRiskScore :json['fallRiskScore'], fallRiskScore :json['fallRiskScore'],
isSigned :json['isSigned'], isSigned :json['isSigned'],
medicationOrders :json['medicationOrders'], medicationOrders :json['medicationOrders'],
nationality :json['nationality'], nationality :json['nationality']??json['NationalityNameN'],
patientMRN :json['patientMRN'], patientMRN :json['patientMRN'] ?? json['PatientMRN'],
); );

@ -486,6 +486,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment MainAxisAlignment
.spaceAround, .spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Column( Column(
crossAxisAlignment: crossAxisAlignment:
@ -500,11 +501,14 @@ class _PatientsScreenState extends State<PatientsScreen> {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
), ),
AppText( AppText(
item.patientId.toString(), item.patientId.toString(),
fontSize: 1.8 * SizeConfig.textMultiplier, fontSize: 1.8 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300, fontWeight: FontWeight.w300,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
),SizedBox(
width: 10,
), ),
], ],
), ),
@ -513,8 +517,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
2.5, 2.5,
), ),
AppText( AppText(
'NATIONALITY: ' + TranslationBase.of(context).nationality +" : "+(
item.nationalityName.toString(), item.nationalityName??item.nationality),
fontSize: fontSize:
1.8 * SizeConfig.textMultiplier, 1.8 * SizeConfig.textMultiplier,
fontWeight: fontWeight:

@ -560,6 +560,9 @@ class TranslationBase {
String get addExamination => localizedValues['addExamination'][locale.languageCode]; String get addExamination => localizedValues['addExamination'][locale.languageCode];
String get patientNoDetailErrMsg => localizedValues['patientNoDetailErrMsg'][locale.languageCode]; String get patientNoDetailErrMsg => localizedValues['patientNoDetailErrMsg'][locale.languageCode];
String get doc => localizedValues['doc'][locale.languageCode]; String get doc => localizedValues['doc'][locale.languageCode];
String get allergicTO=> localizedValues['allergicTO'][locale.languageCode];
String get normal=> localizedValues['normal'][locale.languageCode];
String get abnormal=> localizedValues['abnormal'][locale.languageCode];
} }

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/SOAP/GeneralGetReqForSOAP.dart'; import 'package:doctor_app_flutter/models/SOAP/GeneralGetReqForSOAP.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
@ -8,6 +9,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widg
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PatientPageHeaderWidget extends StatelessWidget { class PatientPageHeaderWidget extends StatelessWidget {
@ -16,6 +18,8 @@ class PatientPageHeaderWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<SOAPViewModel>( return BaseView<SOAPViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP( GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP(
@ -83,7 +87,7 @@ class PatientPageHeaderWidget extends StatelessWidget {
NetworkBaseView( NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: model.patientAllergiesList.isNotEmpty ?AppText( child: model.patientAllergiesList.isNotEmpty ?AppText(
"ALLERGIC TO: "+model.getAllergicNames(), TranslationBase.of(context).allergicTO +" : "+model.getAllergicNames(projectViewModel.isArabic),
color: Color(0xFFB9382C), color: Color(0xFFB9382C),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
) : AppText(''), ) : AppText(''),

@ -141,7 +141,7 @@ class PatientProfileWidget extends StatelessWidget {
height: 4, height: 4,
), ),
AppText( AppText(
patient.nationalityName, patient.nationalityName ??patient.nationality ,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 1.7 * SizeConfig.textMultiplier, fontSize: 1.7 * SizeConfig.textMultiplier,
), ),

@ -36,7 +36,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
crossAxisCount: 2, crossAxisCount: 2,
childAspectRatio: 1.5, childAspectRatio: 1.5,
children: [ children: [
if (int.parse(patientType) == 7) if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -57,7 +57,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
isLoading: model.state == ViewState.BusyLocal, isLoading: model.state == ViewState.BusyLocal,
icon: 'create-episod.png' icon: 'create-episod.png'
), ),
if(int.parse(patientType) ==7) if(int.parse(patientType) ==7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -101,7 +101,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).progress, nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note, nameLine2: TranslationBase.of(context).note,
icon: 'heartbeat.png'), icon: 'heartbeat.png'),
if (selectedPatientType == 7) if (selectedPatientType == 7|| int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -123,7 +123,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: 'Order Test', nameLine1: 'Order Test',
nameLine2: 'Or Procedures', nameLine2: 'Or Procedures',
icon: 'lab.png'), icon: 'lab.png'),
if(selectedPatientType == 7) if(selectedPatientType == 7|| int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -159,7 +159,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
.of(context) .of(context)
.leave, .leave,
icon: 'sick_leaves_icons.png'), icon: 'sick_leaves_icons.png'),
if( selectedPatientType == 7) if( selectedPatientType == 7|| int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,

@ -160,10 +160,18 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
masterKeys: MasterKeysService.Allergies, masterKeys: MasterKeysService.Allergies,
id: element.allergyDiseaseId, id: element.allergyDiseaseId,
typeId: element.allergyDiseaseType); typeId: element.allergyDiseaseType);
MasterKeyModel selectedAllergySeverity = model.getOneMasterKey( MasterKeyModel selectedAllergySeverity;
masterKeys: MasterKeysService.AllergySeverity, if (element.severity == 0) {
id: element.severity, selectedAllergySeverity = MasterKeyModel(
); id: 0,
typeId: MasterKeysService.AllergySeverity.getMasterKeyService(), nameAr: '', nameEn: '');
} else {
selectedAllergySeverity = model.getOneMasterKey(
masterKeys: MasterKeysService.AllergySeverity,
id: element.severity,
);
}
MySelectedAllergy mySelectedAllergy = MySelectedAllergy( MySelectedAllergy mySelectedAllergy = MySelectedAllergy(
selectedAllergy: selectedAllergy, selectedAllergy: selectedAllergy,
isChecked: element.isChecked, isChecked: element.isChecked,

@ -1,9 +1,10 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.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/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_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/my_selected_examination.dart';
@ -24,6 +25,7 @@ import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
class UpdateObjectivePage extends StatefulWidget { class UpdateObjectivePage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
@ -38,7 +40,6 @@ class UpdateObjectivePage extends StatefulWidget {
class _UpdateObjectivePageState extends State<UpdateObjectivePage> { class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
bool isSysExaminationExpand = false; bool isSysExaminationExpand = false;
TextEditingController remarksController = TextEditingController();
BoxDecoration containerBorderDecoration( BoxDecoration containerBorderDecoration(
Color containerColor, Color borderColor) { Color containerColor, Color borderColor) {
@ -55,9 +56,11 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<SOAPViewModel>( return BaseView<SOAPViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
widget.mySelectedExamination.clear();
GetPhysicalExamReqModel getPhysicalExamReqModel = GetPhysicalExamReqModel getPhysicalExamReqModel =
GetPhysicalExamReqModel( GetPhysicalExamReqModel(
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
@ -165,7 +168,9 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
Column( Column(
children: children:
widget.mySelectedExamination.map((examination) { widget.mySelectedExamination.map((examination) {
return Container( TextEditingController remarksController= TextEditingController(text :examination.remark);
return Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 15, right: 15, top: 15), left: 15, right: 15, top: 15),
child: Column(children: [ child: Column(children: [
@ -174,8 +179,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
children: [ children: [
Texts( Texts(
examination ( examination
.selectedExamination.nameEn .selectedExamination.nameEn )
.toUpperCase(), .toUpperCase(),
variant: "bodyText", variant: "bodyText",
bold: true, bold: true,
@ -212,7 +217,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
const EdgeInsets const EdgeInsets
.all(8.0), .all(8.0),
child: Text( child: Text(
"Normal", TranslationBase.of(context).normal,
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: color:
@ -262,7 +267,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
const EdgeInsets const EdgeInsets
.all(8.0), .all(8.0),
child: Text( child: Text(
"Abnormal", TranslationBase.of(context).abnormal,
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: color:
@ -315,7 +320,10 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
maxLines: 25, maxLines: 25,
minLines: 4, minLines: 4,
// controller: remarksController, controller: remarksController,
onChanged: (val) {
examination.remark = val;
},
validator: (value) { validator: (value) {
if (value == null) if (value == null)
return TranslationBase.of(context) return TranslationBase.of(context)

Loading…
Cancel
Save