Merge branch 'referralPatient' into 'development'

Referral patient

See merge request Cloud_Solution/doctor_app_flutter!254
merge-requests/257/head
Mohammad Aljammal 4 years ago
commit fd1caac451

@ -587,6 +587,9 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "There is no detail for this patient",
'ar': "لا توجد تفاصيل لهذا المريض"
},
'allergicTO': {'en': "ALLERGIC TO ", 'ar':" حساس من" },
'normal': {'en': "Normal", 'ar':"عادي" },
'abnormal': {'en': "Abnormal", 'ar':" غير عادي" },
"systolic-lng": {"en": "Systolic", "ar": "الإنقباض"},
"diastolic-lng": {"en": "Diastolic", "ar": "الإنبساط"},
"mass": {"en": "Mass", "ar": "كتلة"},

@ -246,10 +246,15 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
String getAllergicNames(){
String allergiesString='';
String getAllergicNames(isArabic) {
String allergiesString = '';
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;
}

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

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

@ -610,6 +610,10 @@ class TranslationBase {
String get addExamination =>
localizedValues['addExamination'][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];
String get patientNoDetailErrMsg =>
localizedValues['patientNoDetailErrMsg'][locale.languageCode];
String get systolicLng =>

@ -1,4 +1,5 @@
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/models/SOAP/GeneralGetReqForSOAP.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/network_base_view.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PatientPageHeaderWidget extends StatelessWidget {
@ -16,6 +18,8 @@ class PatientPageHeaderWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<SOAPViewModel>(
onModelReady: (model) async {
GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP(
@ -83,7 +87,7 @@ class PatientPageHeaderWidget extends StatelessWidget {
NetworkBaseView(
baseViewModel: model,
child: model.patientAllergiesList.isNotEmpty ?AppText(
"ALLERGIC TO: "+model.getAllergicNames(),
TranslationBase.of(context).allergicTO +" : "+model.getAllergicNames(projectViewModel.isArabic),
color: Color(0xFFB9382C),
fontWeight: FontWeight.bold,
) : AppText(''),

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

@ -42,7 +42,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
crossAxisCount: 2,
childAspectRatio: 1.5,
children: [
if (int.parse(patientType) == 7)
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
@ -61,7 +61,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
},
isLoading: model.state == ViewState.BusyLocal,
icon: 'create-episod.png'),
if (int.parse(patientType) == 7)
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
@ -98,9 +98,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).previewHealth,
nameLine2: TranslationBase.of(context).summaryReport,
icon: 'radiology-1.png'),
if (selectedPatientType != 0 &&
selectedPatientType != 5 &&
selectedPatientType != 7)
if (selectedPatientType != 0 && selectedPatientType != 5 && selectedPatientType != 7)
PatientProfileButton(
key: key,
patient: patient,
@ -108,7 +106,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'heartbeat.png'),
if (selectedPatientType == 7)
if (selectedPatientType == 7|| int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
@ -130,7 +128,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'lab.png'),
if (selectedPatientType == 7)
if (selectedPatientType == 7|| int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
@ -154,7 +152,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'sick_leaves_icons.png'),
if (selectedPatientType == 7)
if (selectedPatientType == 7|| int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,

@ -160,10 +160,18 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
masterKeys: MasterKeysService.Allergies,
id: element.allergyDiseaseId,
typeId: element.allergyDiseaseType);
MasterKeyModel selectedAllergySeverity = model.getOneMasterKey(
masterKeys: MasterKeysService.AllergySeverity,
id: element.severity,
);
MasterKeyModel selectedAllergySeverity;
if (element.severity == 0) {
selectedAllergySeverity = MasterKeyModel(
id: 0,
typeId: MasterKeysService.AllergySeverity.getMasterKeyService(), nameAr: '', nameEn: '');
} else {
selectedAllergySeverity = model.getOneMasterKey(
masterKeys: MasterKeysService.AllergySeverity,
id: element.severity,
);
}
MySelectedAllergy mySelectedAllergy = MySelectedAllergy(
selectedAllergy: selectedAllergy,
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/shared_pref_kay.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/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/master_key_model.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:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
class UpdateObjectivePage extends StatefulWidget {
final Function changePageViewIndex;
@ -38,7 +40,6 @@ class UpdateObjectivePage extends StatefulWidget {
class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
bool isSysExaminationExpand = false;
TextEditingController remarksController = TextEditingController();
BoxDecoration containerBorderDecoration(
Color containerColor, Color borderColor) {
@ -55,9 +56,11 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<SOAPViewModel>(
onModelReady: (model) async {
widget.mySelectedExamination.clear();
GetPhysicalExamReqModel getPhysicalExamReqModel =
GetPhysicalExamReqModel(
patientMRN: widget.patientInfo.patientMRN,
@ -165,7 +168,9 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
Column(
children:
widget.mySelectedExamination.map((examination) {
return Container(
TextEditingController remarksController= TextEditingController(text :examination.remark);
return Container(
margin: EdgeInsets.only(
left: 15, right: 15, top: 15),
child: Column(children: [
@ -174,8 +179,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
MainAxisAlignment.spaceBetween,
children: [
Texts(
examination
.selectedExamination.nameEn
( examination
.selectedExamination.nameEn )
.toUpperCase(),
variant: "bodyText",
bold: true,
@ -212,7 +217,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
const EdgeInsets
.all(8.0),
child: Text(
"Normal",
TranslationBase.of(context).normal,
style: TextStyle(
fontSize: 12,
color:
@ -262,7 +267,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
const EdgeInsets
.all(8.0),
child: Text(
"Abnormal",
TranslationBase.of(context).abnormal,
style: TextStyle(
fontSize: 12,
color:
@ -315,7 +320,10 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
fontWeight: FontWeight.w600,
maxLines: 25,
minLines: 4,
// controller: remarksController,
controller: remarksController,
onChanged: (val) {
examination.remark = val;
},
validator: (value) {
if (value == null)
return TranslationBase.of(context)

Loading…
Cancel
Save