merge-requests/236/head
Sultan Khan 6 years ago
commit 87d90a394b

@ -42,6 +42,8 @@ class BaseAppClient {
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
if (body['DoctorID'] == null) if (body['DoctorID'] == null)
body['DoctorID'] = doctorProfile?.doctorID; body['DoctorID'] = doctorProfile?.doctorID;
if (body['DoctorID'] == "")
body['DoctorID'] = null;
body['EditedBy'] = doctorProfile?.doctorID; body['EditedBy'] = doctorProfile?.doctorID;
if (body['ProjectID'] == null) { if (body['ProjectID'] == null) {
body['ProjectID'] = doctorProfile?.projectID; body['ProjectID'] = doctorProfile?.projectID;

@ -521,4 +521,19 @@ const Map<String, Map<String, String>> localizedValues = {
}, },
'fromTime': {'en': "From Time", 'ar': "من وقت"}, 'fromTime': {'en': "From Time", 'ar': "من وقت"},
'toTime': {'en': "To Time", 'ar': "الى وقت"}, 'toTime': {'en': "To Time", 'ar': "الى وقت"},
'diagnoseType': {'en': "Diagnose Type", 'ar': "نوع التشخيص"},
'condition': {'en': "Condition", 'ar': "الحالة"},
'id': {'en': "ID", 'ar': "بطاقة هوية"},
'quantity': {'en': "Quantity", 'ar': "الكمية"},
'codeNo': {'en': "Code #", 'ar': "# الرمز"},
'covered': {'en': "Covered", 'ar': "مغطى"},
'approvalRequired': {'en': "Approval Required", 'ar': "الموافقة مطلوبة"},
'uncoveredByDoctor': {
'en': "Uncovered By Doctor",
'ar': "غير مغطى من قبل الدكتور"
},
'chiefComplaintEmptyMsg': {
'en': "There is no Chief Complaint",
'ar': "ليس هناك شكوى رئيس"
},
}; };

File diff suppressed because it is too large Load Diff

@ -9,12 +9,13 @@ class MedicalFileService extends BaseService {
List<MedicalFileModel> get medicalFileList => _medicalFileList; List<MedicalFileModel> get medicalFileList => _medicalFileList;
MedicalFileRequestModel _fileRequestModel = MedicalFileRequestModel( MedicalFileRequestModel _fileRequestModel = MedicalFileRequestModel(
patientMRN: 1231755, //patientMRN: 1231755,
vidaAuthTokenID: vidaAuthTokenID:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU",
); );
Future getMedicalFile() async { Future getMedicalFile({int mrn}) async {
_fileRequestModel = MedicalFileRequestModel(patientMRN: mrn);
hasError = false; hasError = false;
_medicalFileList.clear(); _medicalFileList.clear();
await baseAppClient.post(GET_MEDICAL_FILE, await baseAppClient.post(GET_MEDICAL_FILE,

@ -1,5 +1,58 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
class UcafService extends BaseService { class UcafService extends BaseService {
List<GetChiefComplaintResModel> patientChiefComplaintList = [];
VitalSignData patientVitalSigns;
Future getPatientChiefComplaint(PatiantInformtion patient) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientMRN;
body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.episodeNo;
body['DoctorID'] = "";
await baseAppClient.post (GET_CHIEF_COMPLAINT,
onSuccess: (dynamic response, int statusCode) {
print("Success");
patientChiefComplaintList.clear();
response['List_ChiefComplaint']['entityList'].forEach((v) {
patientChiefComplaintList.add(GetChiefComplaintResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getPatientVitalSign(PatiantInformtion patient) async {
patientVitalSigns = null;
hasError = false;
Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientMRN;
body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.episodeNo;
await baseAppClient.post(
GET_PATIENT_VITAL_SIGN_DATA,
onSuccess: (dynamic response, int statusCode) {
if(response['VitalSignsList'] != null){
if(response['VitalSignsList']['entityList'] != null && (response['VitalSignsList']['entityList'] as List).length > 0){
patientVitalSigns = VitalSignData.fromJson(response['VitalSignsList']['entityList'][0]);
}
}
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error.toString();
},
body: body,
);
}
} }

@ -11,43 +11,8 @@ class VitalSignsService extends BaseService{
List<VitalSignResModel> patientVitalSignOrderdSubList = []; List<VitalSignResModel> patientVitalSignOrderdSubList = [];
VitalSignData patientVitalSigns; VitalSignData patientVitalSigns;
/*Future getPatientVitalSign(patient) async {
hasError = false;
await baseAppClient.post(
GET_PATIENT_VITAL_SIGN,
onSuccess: (dynamic response, int statusCode) {
patientVitalSignList = [];
response['List_DoctorPatientVitalSign'].forEach((v) {
patientVitalSignList.add(new VitalSignResModel.fromJson(v));
});
if (patientVitalSignList.length > 0) {
List<VitalSignResModel> patientVitalSignOrderdSubListTemp = [];
patientVitalSignOrderdSubListTemp = patientVitalSignList;
patientVitalSignOrderdSubListTemp
.sort((VitalSignResModel a, VitalSignResModel b) {
return b.vitalSignDate.microsecondsSinceEpoch -
a.vitalSignDate.microsecondsSinceEpoch;
});
patientVitalSignOrderdSubList.clear();
int length = patientVitalSignOrderdSubListTemp.length >= 20
? 20
: patientVitalSignOrderdSubListTemp.length;
for (int x = 0; x < length; x++) {
patientVitalSignOrderdSubList
.add(patientVitalSignOrderdSubListTemp[x]);
}
}
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: patient,
);
} // Vit*/
Future getPatientVitalSign(PatiantInformtion patient) async { Future getPatientVitalSign(PatiantInformtion patient) async {
patientVitalSigns = null;
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientMRN; body['PatientMRN'] = patient.patientMRN;
@ -59,7 +24,7 @@ class VitalSignsService extends BaseService{
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
if(response['VitalSignsList'] != null){ if(response['VitalSignsList'] != null){
if(response['VitalSignsList']['entityList'] != null && (response['VitalSignsList']['entityList'] as List).length > 0){ if(response['VitalSignsList']['entityList'] != null && (response['VitalSignsList']['entityList'] as List).length > 0){
patientVitalSigns = VitalSignData.fromJson(response['VitalSignsList']['entityList']['0']); patientVitalSigns = VitalSignData.fromJson(response['VitalSignsList']['entityList'][0]);
} }
} }
}, },

@ -11,6 +11,8 @@ class PrescriptionService extends BaseService {
List<PrescriptionModel> get prescriptionList => _prescriptionList; List<PrescriptionModel> get prescriptionList => _prescriptionList;
List<SearchDrugModel> _drugsList = List(); List<SearchDrugModel> _drugsList = List();
List<SearchDrugModel> get drugsList => _drugsList; List<SearchDrugModel> get drugsList => _drugsList;
List<dynamic> doctorsList = [];
List<dynamic> specialityList = [];
PrescriptionReqModel _prescriptionReqModel = PrescriptionReqModel( PrescriptionReqModel _prescriptionReqModel = PrescriptionReqModel(
patientMRN: 3120877, patientMRN: 3120877,
@ -26,7 +28,8 @@ class PrescriptionService extends BaseService {
PostPrescriptionReqModel _postPrescriptionReqModel = PostPrescriptionReqModel _postPrescriptionReqModel =
PostPrescriptionReqModel(); PostPrescriptionReqModel();
Future getPrescription() async { Future getPrescription({int mrn}) async {
_prescriptionReqModel = PrescriptionReqModel(patientMRN: 3120877);
hasError = false; hasError = false;
_prescriptionList.clear(); _prescriptionList.clear();
await baseAppClient.post(GET_PRESCRIPTION_LIST, await baseAppClient.post(GET_PRESCRIPTION_LIST,
@ -41,10 +44,11 @@ class PrescriptionService extends BaseService {
Future getDrugs() async { Future getDrugs() async {
hasError = false; hasError = false;
_drugsList.clear();
await baseAppClient.post(SEARCH_DRUG, await baseAppClient.post(SEARCH_DRUG,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_drugsList.add(SearchDrugModel.fromJson(response['MedicationList'])); doctorsList = [];
doctorsList = response['MedicationList']['entityList'];
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -12,11 +12,11 @@ class MedicalFileViewModel extends BaseViewModel {
List<MedicalFileModel> get medicalFileList => List<MedicalFileModel> get medicalFileList =>
_medicalFileService.medicalFileList; _medicalFileService.medicalFileList;
Future getMedicalFile() async { Future getMedicalFile({int mrn}) async {
hasError = false; hasError = false;
//_insuranceCardService.clearInsuranceCard(); //_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy); setState(ViewState.Busy);
await _medicalFileService.getMedicalFile(); await _medicalFileService.getMedicalFile(mrn: mrn);
if (_medicalFileService.hasError) { if (_medicalFileService.hasError) {
error = _medicalFileService.error; error = _medicalFileService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -1,9 +1,30 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/patient-ucaf-service.dart'; import 'package:doctor_app_flutter/core/service/patient-ucaf-service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import '../../locator.dart'; import '../../locator.dart';
class UcafViewModel extends BaseViewModel { class UcafViewModel extends BaseViewModel {
UcafService _ucafService = locator<UcafService>(); UcafService _ucafService = locator<UcafService>();
List<GetChiefComplaintResModel> get patientChiefComplaintList => _ucafService.patientChiefComplaintList;
VitalSignData get patientVitalSigns => _ucafService.patientVitalSigns;
Future getUCAFData(PatiantInformtion patient) async {
setState(ViewState.Busy);
await _ucafService.getPatientVitalSign(patient);
await _ucafService.getPatientChiefComplaint(patient);
if (_ucafService.hasError) {
error = _ucafService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
} }

@ -95,7 +95,7 @@ class VitalSignsViewModel extends BaseViewModel {
); );
} }
String getBMI(double bodyMassIndex) { String getBMI(var bodyMassIndex) {
if (bodyMassIndex <= 18.5) { if (bodyMassIndex <= 18.5) {
return "Underweight"; return "Underweight";
} else if (bodyMassIndex <= 25.0) { } else if (bodyMassIndex <= 25.0) {

@ -12,13 +12,13 @@ class PrescriptionViewModel extends BaseViewModel {
List<PrescriptionModel> get prescriptionList => List<PrescriptionModel> get prescriptionList =>
_prescriptionService.prescriptionList; _prescriptionService.prescriptionList;
List<SearchDrugModel> get drugsList => _prescriptionService.drugsList; List<dynamic> get drugsList => _prescriptionService.doctorsList;
Future getPrescription() async { Future getPrescription({int mrn}) async {
hasError = false; hasError = false;
//_insuranceCardService.clearInsuranceCard(); //_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy); setState(ViewState.Busy);
await _prescriptionService.getPrescription(); await _prescriptionService.getPrescription(mrn: mrn);
if (_prescriptionService.hasError) { if (_prescriptionService.hasError) {
error = _prescriptionService.error; error = _prescriptionService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -27,7 +27,7 @@ class PrescriptionViewModel extends BaseViewModel {
} }
Future postPrescription( Future postPrescription(
PostPrescriptionReqModel postProcedureReqModel) async { PostPrescriptionReqModel postProcedureReqModel, int mrn) async {
hasError = false; hasError = false;
//_insuranceCardService.clearInsuranceCard(); //_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy); setState(ViewState.Busy);
@ -36,13 +36,13 @@ class PrescriptionViewModel extends BaseViewModel {
error = _prescriptionService.error; error = _prescriptionService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else { } else {
await getPrescription(); await getPrescription(mrn: mrn);
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
Future updatePrescription( Future updatePrescription(
PostPrescriptionReqModel updatePrescriptionReqModel) async { PostPrescriptionReqModel updatePrescriptionReqModel, int mrn) async {
hasError = false; hasError = false;
//_insuranceCardService.clearInsuranceCard(); //_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy); setState(ViewState.Busy);
@ -51,7 +51,7 @@ class PrescriptionViewModel extends BaseViewModel {
error = _prescriptionService.error; error = _prescriptionService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else { } else {
await getPrescription(); await getPrescription(mrn: mrn);
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }

@ -5,7 +5,7 @@ class VitalSignData {
int bloodPressureHigher; int bloodPressureHigher;
int bloodPressureLower; int bloodPressureLower;
int bloodPressurePatientPosition; int bloodPressurePatientPosition;
double bodyMassIndex; var bodyMassIndex;
int fio2; int fio2;
int headCircumCm; int headCircumCm;
int heightCm; int heightCm;

File diff suppressed because it is too large Load Diff

@ -22,7 +22,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient']; patient = routeArgs['patient'];
return BaseView<MedicalFileViewModel>( return BaseView<MedicalFileViewModel>(
onModelReady: (model) => model.getMedicalFile(), onModelReady: (model) => model.getMedicalFile(mrn: patient.patientMRN),
builder: builder:
(BuildContext context, MedicalFileViewModel model, Widget child) => (BuildContext context, MedicalFileViewModel model, Widget child) =>
AppScaffold( AppScaffold(
@ -30,140 +30,147 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
appBarTitle: 'medical Report'.toUpperCase(), appBarTitle: 'medical Report'.toUpperCase(),
body: NetworkBaseView( body: NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: Container( child: SingleChildScrollView(
child: Column( child: Container(
children: [ child: Column(
Padding( children: [
padding: EdgeInsets.all(8.0), Padding(
child: Row( padding: EdgeInsets.all(8.0),
children: <Widget>[ child: Row(
AvatarWidget( children: <Widget>[
Icon( AvatarWidget(
patient.genderDescription == "Male" Icon(
? DoctorApp.male patient.genderDescription == "Male"
: DoctorApp.female_icon, ? DoctorApp.male
size: 70, : DoctorApp.female_icon,
color: Colors.white, size: 70,
), color: Colors.white,
),
SizedBox(
width: 20,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
patient.firstName + ' ' + patient.lastName,
color: Colors.black,
fontWeight: FontWeight.bold,
),
Row(
children: [
AppText(
TranslationBase.of(context).fileNo,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 5.0,
),
AppText(
patient.age.toString(),
color: Colors.black,
fontWeight: FontWeight.normal,
),
],
),
AppText(
"ALLERGIC TO: FOOD, ASPIRIN",
color: Color(0xFFB9382C),
fontWeight: FontWeight.bold,
), ),
], ),
) SizedBox(
], width: 20,
), ),
), Column(
Divider( crossAxisAlignment: CrossAxisAlignment.start,
height: 1.0, children: [
thickness: 1.0, AppText(
color: Colors.grey, patient.firstName + ' ' + patient.lastName,
), color: Colors.black,
ListView.builder( fontWeight: FontWeight.bold,
scrollDirection: Axis.vertical, ),
shrinkWrap: true, Row(
itemCount: 2,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.0, vertical: 8.0),
child: InkWell(
child: Container(
child: Column(
children: [ children: [
Row( AppText(
children: [ TranslationBase.of(context).fileNo,
AppText( color: Colors.black,
'Branch : ', fontWeight: FontWeight.bold,
fontWeight: FontWeight.w700,
),
AppText(
model.medicalFileList[0].entityList[0]
.admissions[index].projectName,
),
],
), ),
Row( SizedBox(
children: [ width: 5.0,
AppText( ),
'Doctor : '.toUpperCase(), AppText(
fontWeight: FontWeight.w700, patient.age.toString(),
), color: Colors.black,
AppText( fontWeight: FontWeight.normal,
model.medicalFileList[0].entityList[0]
.admissions[index].doctor
.toUpperCase(),
fontWeight: FontWeight.w700,
),
],
), ),
Row( ],
),
AppText(
"ALLERGIC TO: FOOD, ASPIRIN",
color: Color(0xFFB9382C),
fontWeight: FontWeight.bold,
),
],
)
],
),
),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey,
),
if (model.medicalFileList.length != 0)
ListView.builder(
//physics: ,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model
.medicalFileList[0].entityList[0].timelines.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.0, vertical: 8.0),
child: InkWell(
child: Container(
child: Column(
children: [ children: [
AppText( Row(
'Clinic : ', children: [
fontWeight: FontWeight.w700, AppText(
'Branch : ',
fontWeight: FontWeight.w700,
),
AppText(model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.projectName),
],
), ),
AppText( Row(
model.medicalFileList[0].entityList[0] children: [
.admissions[index].clinic, AppText(
'Doctor : '.toUpperCase(),
fontWeight: FontWeight.w700,
),
AppText(
model.medicalFileList[0].entityList[0]
.timelines[index].doctorName,
fontWeight: FontWeight.w700,
),
],
), ),
Row(
children: [
AppText(
'Clinic : ',
fontWeight: FontWeight.w700,
),
AppText(
model.medicalFileList[0].entityList[0]
.timelines[index].clinicName,
),
],
),
SizedBox(height: 10.0),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey.shade400,
)
], ],
), ),
SizedBox(height: 10.0), ),
Divider( onTap: () {
height: 1.0, Navigator.push(
thickness: 1.0, context,
color: Colors.grey.shade400, MaterialPageRoute(
) builder: (context) => MedicalFileDetails(
], age: patient.age,
firstName: patient.firstName,
lastName: patient.lastName,
gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientMRN,
)),
);
},
), ),
), );
onTap: () { })
Navigator.push( ],
context, ),
MaterialPageRoute(
builder: (context) => MedicalFileDetails(
age: patient.age,
firstName: patient.firstName,
lastName: patient.lastName,
gender: patient.genderDescription,
)),
);
},
),
);
})
],
), ),
), ),
), ),

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
@ -5,6 +6,7 @@ import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
@ -14,7 +16,6 @@ class UcafDetailScreen extends StatefulWidget {
} }
class _UcafDetailScreenState extends State<UcafDetailScreen> { class _UcafDetailScreenState extends State<UcafDetailScreen> {
int _activeTap = 0; int _activeTap = 0;
@override @override
@ -45,7 +46,7 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
SizedBox( SizedBox(
height: 16, height: 16,
), ),
getSelectedTreatmentStepItem(context), ...getSelectedTreatmentStepItem(context),
], ],
), ),
), ),
@ -64,8 +65,8 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
]; ];
return Container( return Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
decoration: decoration: Helpers.containerBorderDecoration(
Helpers.containerBorderDecoration(Color(0Xffffffff), Color(0xFFCCCCCC)), Color(0Xffffffff), Color(0xFFCCCCCC)),
child: Row( child: Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -105,8 +106,296 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
); );
} }
Widget getSelectedTreatmentStepItem(BuildContext _context) { List<Widget> getSelectedTreatmentStepItem(BuildContext _context) {
return Container(); switch (_activeTap) {
case 0:
return [...List.generate(2, (index) => DiagnosisWidget()).toList()];
case 1:
return [...List.generate(2, (index) => MedicationWidget()).toList()];
case 2:
return [...List.generate(2, (index) => ProceduresWidget()).toList()];
default:
return [
Container(),
];
}
}
}
class DiagnosisWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).diagnoseType}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"Preliminary Diagnosis",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
Expanded(
child: AppText(
"B34.2 | CORONA VIRUS INFECTION, UNSPECIFIED SITE",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
AppText(
"${TranslationBase.of(context).condition}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"174.00 Same",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
SizedBox(
height: 16,
),
const Divider(
color: Color(0xffCCCCCC),
height: 1,
thickness: 1,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 16,
),
],
);
}
}
class MedicationWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).id}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"6",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
SizedBox(
width: 16,
),
AppText(
"${TranslationBase.of(context).price}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"35.6",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
SizedBox(
width: 16,
),
AppText(
"${TranslationBase.of(context).quantity}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"3",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
Expanded(
child: AppText(
"EVE SKIN CREAM WITH HONEY -170GM",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
Expanded(
child: AppText(
"Every other day for 5 days",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
),
],
),
SizedBox(
height: 16,
),
const Divider(
color: Color(0xffCCCCCC),
height: 1,
thickness: 1,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 16,
),
],
);
} }
}
class ProceduresWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).codeNo}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"019054846",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
AppText(
"${TranslationBase.of(context).quantity}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"1",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
Expanded(
child: AppText(
"SCAN - RENAL MASS PROTOCOL",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
AppText(
"${TranslationBase.of(context).covered}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"Yes",
fontWeight: FontWeight.normal,
color: Colors.green,
fontSize: SizeConfig.textMultiplier * 2.0,
),
SizedBox(
width: 16,
),
AppText(
"${TranslationBase.of(context).approvalRequired}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"Yes",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
AppText(
"${TranslationBase.of(context).uncoveredByDoctor}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"Yes",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
SizedBox(
height: 16,
),
const Divider(
color: Color(0xffCCCCCC),
height: 1,
thickness: 1,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 16,
),
],
);
}
} }

@ -14,6 +14,7 @@ import 'package:flutter/services.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import '../../../../routes.dart'; import '../../../../routes.dart';
import '../../../QR_reader_screen.dart';
class UCAFInputScreen extends StatefulWidget { class UCAFInputScreen extends StatefulWidget {
@override @override
@ -55,312 +56,338 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
return BaseView<UcafViewModel>( return BaseView<UcafViewModel>(
onModelReady: (model) => model.getUCAFData(patient),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
appBarTitle: TranslationBase.of(context).ucaf, appBarTitle: TranslationBase.of(context).ucaf,
body: SingleChildScrollView( body: model.patientVitalSigns != null &&
child: Column( model.patientChiefComplaintList != null &&
children: [ model.patientChiefComplaintList.length > 0
PatientHeaderWidgetNoAvatar(patient), ? SingleChildScrollView(
Container(
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 16),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
CheckboxListTile( PatientHeaderWidgetNoAvatar(patient),
title: AppText(
TranslationBase.of(context).inPatient,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.1,
),
value: _inPatient,
onChanged: (newValue) {
setState(() {
_inPatient = newValue;
});
},
controlAffinity: ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0),
),
CheckboxListTile(
title: AppText(
TranslationBase.of(context).emergencyCase,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.1,
),
value: _emergencyCase,
onChanged: (newValue) {
setState(() {
_emergencyCase = newValue;
});
},
controlAffinity: ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0),
),
Container( Container(
height: screenSize.height * 0.070, margin:
child: TextField( EdgeInsets.symmetric(vertical: 16, horizontal: 16),
decoration: Helpers.textFieldSelectorDecoration( child: Column(
TranslationBase.of(context).durationOfIllness, crossAxisAlignment: CrossAxisAlignment.start,
null, children: [
false), CheckboxListTile(
enabled: true, title: AppText(
controller: _durationOfIllnessController, TranslationBase.of(context).inPatient,
inputFormatters: [ fontWeight: FontWeight.bold,
FilteringTextInputFormatter.allow( fontSize: SizeConfig.textMultiplier * 2.1,
RegExp(ONLY_NUMBERS))
],
keyboardType: TextInputType.number,
)),
SizedBox(
height: 10,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"BP (H/L)",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"120/80",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
"${TranslationBase.of(context).temperature}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"37.5(C), 98.6(F)",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
],
),
SizedBox(
height: 4,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).pulseBeats} :",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
), ),
AppText( value: _inPatient,
"80", onChanged: (newValue) {
fontSize: SizeConfig.textMultiplier * 2, setState(() {
color: Colors.grey.shade800, _inPatient = newValue;
fontWeight: FontWeight.normal, });
},
controlAffinity: ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0),
),
CheckboxListTile(
title: AppText(
TranslationBase.of(context).emergencyCase,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.1,
), ),
], value: _emergencyCase,
), onChanged: (newValue) {
], setState(() {
), _emergencyCase = newValue;
SizedBox( });
height: 16, },
), controlAffinity: ListTileControlAffinity.leading,
AppText( contentPadding: EdgeInsets.all(0),
TranslationBase.of(context).chiefComplaintsAndSymptoms, ),
fontWeight: FontWeight.bold, Container(
fontSize: SizeConfig.textMultiplier * 2.5, height: screenSize.height * 0.070,
), child: TextField(
SizedBox( decoration: Helpers.textFieldSelectorDecoration(
height: 8, TranslationBase.of(context)
), .durationOfIllness,
AppText( null,
TranslationBase.of(context) false),
.patientFeelsPainInHisBackAndCough, enabled: true,
fontWeight: FontWeight.normal, controller: _durationOfIllnessController,
fontSize: SizeConfig.textMultiplier * 2.0, inputFormatters: [
), FilteringTextInputFormatter.allow(
SizedBox( RegExp(ONLY_NUMBERS))
height: 8, ],
), keyboardType: TextInputType.number,
Container( )),
child: TextField( SizedBox(
decoration: Helpers.textFieldSelectorDecoration( height: 10,
TranslationBase.of(context).additionalTextComplaints, ),
null, Row(
false), mainAxisAlignment: MainAxisAlignment.spaceBetween,
enabled: true, children: [
controller: _additionalComplaintsController, Row(
keyboardType: TextInputType.text, children: [
minLines: 4, AppText(
maxLines: 6, "BP (H/L)",
)), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
height: 16, fontWeight: FontWeight.w700,
), ),
AppText( SizedBox(
TranslationBase.of(context).otherConditions, width: 8,
fontWeight: FontWeight.bold, ),
fontSize: SizeConfig.textMultiplier * 2.0, AppText(
), "${model.patientVitalSigns.bloodPressureHigher}/${model.patientVitalSigns.bloodPressureLower}",
...List.generate( fontSize: SizeConfig.textMultiplier * 2,
conditionsData.length, color: Colors.grey.shade800,
(index) => CheckboxListTile( fontWeight: FontWeight.normal,
title: AppText( ),
conditionsData[index]['name'], ],
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.1,
), ),
value: conditionsData[index]['isChecked'], Row(
onChanged: (newValue) { children: [
setState(() { AppText(
conditionsData[index]['isChecked'] = newValue; "${TranslationBase.of(context).temperature}",
}); fontSize: SizeConfig.textMultiplier * 1.8,
}, color: Colors.black,
controlAffinity: ListTileControlAffinity.leading, fontWeight: FontWeight.w700,
contentPadding: EdgeInsets.all(0), ),
)), SizedBox(
SizedBox( width: 8,
height: 8, ),
), AppText(
Container( "${model.patientVitalSigns.temperatureCelcius}(C), ${model.patientVitalSigns.temperatureCelcius * (9 / 5) + 32}(F)",
height: screenSize.height * 0.070, fontSize: SizeConfig.textMultiplier * 2,
child: TextField( color: Colors.grey.shade800,
decoration: Helpers.textFieldSelectorDecoration( fontWeight: FontWeight.normal,
TranslationBase.of(context).other, ),
null, ],
false), ),
enabled: true, ],
controller: _otherController, ),
keyboardType: TextInputType.text, SizedBox(
)), height: 4,
SizedBox( ),
height: 8, Row(
), mainAxisAlignment: MainAxisAlignment.spaceBetween,
Container( children: [
height: screenSize.height * 0.070, Row(
child: TextField( children: [
decoration: Helpers.textFieldSelectorDecoration( AppText(
TranslationBase.of(context).how, "${TranslationBase.of(context).pulseBeats} :",
null, fontSize: SizeConfig.textMultiplier * 1.8,
false), color: Colors.black,
enabled: true, fontWeight: FontWeight.w700,
controller: _howController, ),
keyboardType: TextInputType.text, SizedBox(
)), width: 8,
SizedBox( ),
height: 8, AppText(
), "${model.patientVitalSigns.pulseBeatPerMinute}",
Row( fontSize: SizeConfig.textMultiplier * 2,
children: [ color: Colors.grey.shade800,
Expanded( fontWeight: FontWeight.normal,
child: Container( ),
],
),
],
),
SizedBox(
height: 16,
),
AppText(
TranslationBase.of(context)
.chiefComplaintsAndSymptoms,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.5,
),
SizedBox(
height: 8,
),
AppText(
TranslationBase.of(context)
.patientFeelsPainInHisBackAndCough,
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
SizedBox(
height: 8,
),
Container(
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.additionalTextComplaints,
helpers.parseHtmlString(model
.patientChiefComplaintList[0]
.chiefComplaint),
false),
enabled: false,
controller: _additionalComplaintsController,
keyboardType: TextInputType.text,
/*minLines: 4,
maxLines: 6,*/
)),
SizedBox(
height: 16,
),
AppText(
TranslationBase.of(context).otherConditions,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
...List.generate(
conditionsData.length,
(index) => CheckboxListTile(
title: AppText(
conditionsData[index]['name'],
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.1,
),
value: conditionsData[index]['isChecked'],
onChanged: (newValue) {
setState(() {
conditionsData[index]['isChecked'] =
newValue;
});
},
controlAffinity:
ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0),
)),
SizedBox(
height: 8,
),
Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: TextField( child: TextField(
decoration: Helpers.textFieldSelectorDecoration( decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).when, TranslationBase.of(context).other,
null, null,
false), false),
enabled: true, enabled: true,
controller: _whenController, controller: _otherController,
keyboardType: TextInputType.text, keyboardType: TextInputType.text,
)), )),
), SizedBox(
SizedBox( height: 8,
width: 4, ),
), Container(
Expanded(
child: Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: TextField( child: TextField(
decoration: Helpers.textFieldSelectorDecoration( decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).where, TranslationBase.of(context).how,
null, null,
false), false),
enabled: true, enabled: true,
controller: _whereController, controller: _howController,
keyboardType: TextInputType.text, keyboardType: TextInputType.text,
)), )),
), SizedBox(
], height: 8,
), ),
SizedBox( Row(
height: 8, children: [
), Expanded(
Container( child: Container(
child: TextField( height: screenSize.height * 0.070,
decoration: Helpers.textFieldSelectorDecoration( child: TextField(
TranslationBase.of(context).specifyPossibleLineManagement, decoration:
null, Helpers.textFieldSelectorDecoration(
false), TranslationBase.of(context).when,
enabled: true, null,
controller: _managementsLineController, false),
keyboardType: TextInputType.text, enabled: true,
minLines: 4, controller: _whenController,
maxLines: 6, keyboardType: TextInputType.text,
)), )),
SizedBox( ),
height: 16, SizedBox(
), width: 4,
AppText( ),
TranslationBase.of(context) Expanded(
.significantSigns, child: Container(
fontWeight: FontWeight.bold, height: screenSize.height * 0.070,
fontSize: SizeConfig.textMultiplier * 2.0, child: TextField(
), decoration:
SizedBox( Helpers.textFieldSelectorDecoration(
height: 8, TranslationBase.of(context).where,
), null,
Container( false),
child: TextField( enabled: true,
decoration: Helpers.textFieldSelectorDecoration( controller: _whereController,
TranslationBase.of(context).backAbdomen, keyboardType: TextInputType.text,
null, )),
false), ),
enabled: true, ],
controller: _signsController, ),
keyboardType: TextInputType.text, SizedBox(
minLines: 4, height: 8,
maxLines: 6, ),
)), Container(
SizedBox( child: TextField(
height: 16, decoration: Helpers.textFieldSelectorDecoration(
), TranslationBase.of(context)
AppButton( .specifyPossibleLineManagement,
title: TranslationBase.of(context).next, null,
color: HexColor("#B8382B"), false),
onPressed: (){ enabled: true,
Navigator.of(context).pushNamed(PATIENT_UCAF_DETAIL, arguments: {'patient': patient}); controller: _managementsLineController,
}, keyboardType: TextInputType.text,
minLines: 4,
maxLines: 6,
)),
SizedBox(
height: 16,
),
AppText(
TranslationBase.of(context).significantSigns,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
SizedBox(
height: 8,
),
Container(
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).backAbdomen,
null,
false),
enabled: true,
controller: _signsController,
keyboardType: TextInputType.text,
)),
SizedBox(
height: 16,
),
AppButton(
title: TranslationBase.of(context).next,
color: HexColor("#B8382B"),
onPressed: () {
Navigator.of(context).pushNamed(
PATIENT_UCAF_DETAIL,
arguments: {'patient': patient});
},
),
],
),
), ),
], ],
), ),
)
: Container(
child: Center(
child: AppText(
model.patientVitalSigns == null
? TranslationBase.of(context).vitalSignEmptyMsg
: TranslationBase.of(context).chiefComplaintEmptyMsg,
fontWeight: FontWeight.normal,
color: HexColor("#B8382B"),
fontSize: SizeConfig.textMultiplier * 2.5,
),
),
), ),
],
),
),
), ),
); );
} }

@ -124,7 +124,10 @@ class _AdmissionRequestDetailScreenState
ListSelectDialog dialog = ListSelectDialog dialog =
ListSelectDialog( ListSelectDialog(
list: model.speciality, list: model.speciality,
attributeName: model.selectedLanguage == 'ar' ? 'nameAr' :'nameEn' , attributeName:
model.selectedLanguage == 'ar'
? 'nameAr'
: 'nameEn',
attributeValueId: 'id', attributeValueId: 'id',
okText: okText:
TranslationBase.of(context) TranslationBase.of(context)
@ -149,7 +152,12 @@ class _AdmissionRequestDetailScreenState
TranslationBase.of(context) TranslationBase.of(context)
.speciality, .speciality,
_selectedSpeciality != null _selectedSpeciality != null
? model.selectedLanguage == 'ar' ? _selectedSpeciality['nameAr'] : _selectedSpeciality['nameEn'] ? model.selectedLanguage ==
'ar'
? _selectedSpeciality[
'nameAr']
: _selectedSpeciality[
'nameEn']
: null, : null,
true), true),
enabled: false, enabled: false,
@ -163,36 +171,42 @@ class _AdmissionRequestDetailScreenState
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: InkWell( child: InkWell(
onTap: model.doctorsList != null && onTap: model.doctorsList != null &&
model.doctorsList.length > 0 model.doctorsList.length > 0
? () { ? () {
ListSelectDialog dialog = ListSelectDialog dialog =
ListSelectDialog( ListSelectDialog(
list: model.doctorsList, list: model.doctorsList,
attributeName: 'DoctorName', attributeName: 'DoctorName',
attributeValueId: 'DoctorID', attributeValueId: 'DoctorID',
okText: TranslationBase.of(context).ok, okText:
okFunction: (selectedValue) { TranslationBase.of(context)
setState(() { .ok,
_selectedDoctor = selectedValue; okFunction: (selectedValue) {
}); setState(() {
}, _selectedDoctor =
); selectedValue;
showDialog( });
barrierDismissible: false, },
context: context, );
builder: (BuildContext context) { showDialog(
return dialog; barrierDismissible: false,
}, context: context,
); builder: (BuildContext context) {
} return dialog;
},
);
}
: null, : null,
child: TextField( child: TextField(
decoration: Helpers.textFieldSelectorDecoration( decoration:
TranslationBase.of(context).doctor, Helpers.textFieldSelectorDecoration(
_selectedDoctor != null TranslationBase.of(context)
? _selectedDoctor['DoctorName'] .doctor,
: null, _selectedDoctor != null
true), ? _selectedDoctor[
'DoctorName']
: null,
true),
enabled: false, enabled: false,
), ),
), ),
@ -202,23 +216,22 @@ class _AdmissionRequestDetailScreenState
), ),
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
decoration: decoration: Helpers.containerBorderDecoration(
Helpers.containerBorderDecoration( Color(0xFFEEEEEE), Color(0xFFCCCCCC),
Color(0xFFEEEEEE),
Color(0xFFCCCCCC),
borderWidth: 0.0), borderWidth: 0.0),
child: InkWell( child: InkWell(
onTap: () => null, onTap: () => null,
child: TextField( child: TextField(
decoration: decoration:
Helpers.textFieldSelectorDecoration( Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).referringDate, TranslationBase.of(context)
null, .referringDate,
true, null,
suffixIcon: Icon( true,
Icons.calendar_today, suffixIcon: Icon(
color: Color(0xFFCCCCCC), Icons.calendar_today,
)), color: Color(0xFFCCCCCC),
)),
enabled: false, enabled: false,
), ),
), ),
@ -228,17 +241,19 @@ class _AdmissionRequestDetailScreenState
), ),
Container( Container(
decoration: decoration:
Helpers.containerBorderDecoration( Helpers.containerBorderDecoration(
Color(0xFFEEEEEE), Color(0xFFEEEEEE),
Color(0xFFCCCCCC), Color(0xFFCCCCCC),
borderWidth: 0.0), borderWidth: 0.0),
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: TextField( child: TextField(
decoration: decoration:
Helpers.textFieldSelectorDecoration( Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).referringDoctor, TranslationBase.of(context)
null, .referringDoctor,
true, dropDownColor: Color(0xFFCCCCCC)), null,
true,
dropDownColor: Color(0xFFCCCCCC)),
enabled: false, enabled: false,
// controller: _remarksController, // controller: _remarksController,
keyboardType: TextInputType.text, keyboardType: TextInputType.text,
@ -255,8 +270,10 @@ class _AdmissionRequestDetailScreenState
child: AppButton( child: AppButton(
title: TranslationBase.of(context).next, title: TranslationBase.of(context).next,
color: HexColor("#B8382B"), color: HexColor("#B8382B"),
onPressed: (){ onPressed: () {
Navigator.of(context).pushNamed(PATIENT_ADMISSION_REQUEST_2, arguments: {'patient': patient}); Navigator.of(context).pushNamed(
PATIENT_ADMISSION_REQUEST_2,
arguments: {'patient': patient});
}, },
), ),
), ),

@ -139,13 +139,13 @@ class _AdmissionRequestSecondScreenState
_emergencyAdmission = newValue; _emergencyAdmission = newValue;
}); });
}, },
controlAffinity: ListTileControlAffinity.leading, controlAffinity:
ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0), contentPadding: EdgeInsets.all(0),
), ),
CheckboxListTile( CheckboxListTile(
title: AppText( title: AppText(
TranslationBase.of(context) TranslationBase.of(context).patientPregnant,
.patientPregnant,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.1, fontSize: SizeConfig.textMultiplier * 2.1,
), ),
@ -155,28 +155,32 @@ class _AdmissionRequestSecondScreenState
_patientPregnant = newValue; _patientPregnant = newValue;
}); });
}, },
controlAffinity: ListTileControlAffinity.leading, controlAffinity:
ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0), contentPadding: EdgeInsets.all(0),
), ),
Container( Container(
child: TextField( child: TextField(
decoration: Helpers.textFieldSelectorDecoration( decoration:
TranslationBase.of(context).treatmentLine, Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.treatmentLine,
null, null,
false), false),
enabled: true, enabled: true,
controller: _treatmentLineController, controller: _treatmentLineController,
keyboardType: TextInputType.text, keyboardType: TextInputType.text,
minLines: 4, minLines: 4,
maxLines: 6, maxLines: 6,
)), )),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: InkWell( child: InkWell(
onTap: /*model.doctorsList != null && onTap:
/*model.doctorsList != null &&
model.doctorsList.length > 0 model.doctorsList.length > 0
? () { ? () {
ListSelectDialog dialog = ListSelectDialog dialog =
@ -199,14 +203,17 @@ class _AdmissionRequestSecondScreenState
}, },
); );
} }
:*/ null, :*/
null,
child: TextField( child: TextField(
decoration: Helpers.textFieldSelectorDecoration( decoration:
TranslationBase.of(context).ward, Helpers.textFieldSelectorDecoration(
/* _selectedWard != null TranslationBase.of(context).ward,
/* _selectedWard != null
? _selectedWard['DoctorName'] ? _selectedWard['DoctorName']
:*/ null, :*/
true), null,
true),
enabled: false, enabled: false,
), ),
), ),
@ -224,13 +231,15 @@ class _AdmissionRequestSecondScreenState
_preAnesthesiaReferred = newValue; _preAnesthesiaReferred = newValue;
}); });
}, },
controlAffinity: ListTileControlAffinity.leading, controlAffinity:
ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0), contentPadding: EdgeInsets.all(0),
), ),
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: InkWell( child: InkWell(
onTap: /*model.doctorsList != null && onTap:
/*model.doctorsList != null &&
model.doctorsList.length > 0 model.doctorsList.length > 0
? () { ? () {
ListSelectDialog dialog = ListSelectDialog dialog =
@ -253,14 +262,18 @@ class _AdmissionRequestSecondScreenState
}, },
); );
} }
:*/ null, :*/
null,
child: TextField( child: TextField(
decoration: Helpers.textFieldSelectorDecoration( decoration:
TranslationBase.of(context).admissionType, Helpers.textFieldSelectorDecoration(
/* _admissionType != null TranslationBase.of(context)
.admissionType,
/* _admissionType != null
? _admissionType['DoctorName'] ? _admissionType['DoctorName']
:*/ null, :*/
true), null,
true),
enabled: false, enabled: false,
), ),
), ),
@ -271,7 +284,8 @@ class _AdmissionRequestSecondScreenState
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: InkWell( child: InkWell(
onTap: /*model.doctorsList != null && onTap:
/*model.doctorsList != null &&
model.doctorsList.length > 0 model.doctorsList.length > 0
? () { ? () {
ListSelectDialog dialog = ListSelectDialog dialog =
@ -294,14 +308,18 @@ class _AdmissionRequestSecondScreenState
}, },
); );
} }
:*/ null, :*/
null,
child: TextField( child: TextField(
decoration: Helpers.textFieldSelectorDecoration( decoration:
TranslationBase.of(context).diagnosis, Helpers.textFieldSelectorDecoration(
/* _admissionType != null TranslationBase.of(context)
.diagnosis,
/* _admissionType != null
? _admissionType['DoctorName'] ? _admissionType['DoctorName']
:*/ null, :*/
true), null,
true),
enabled: false, enabled: false,
), ),
), ),
@ -311,23 +329,26 @@ class _AdmissionRequestSecondScreenState
), ),
Container( Container(
child: TextField( child: TextField(
decoration: Helpers.textFieldSelectorDecoration( decoration:
TranslationBase.of(context).preOperativeOrders, Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.preOperativeOrders,
null, null,
false), false),
enabled: true, enabled: true,
controller: _preOperativeOrdersController, controller: _preOperativeOrdersController,
keyboardType: TextInputType.text, keyboardType: TextInputType.text,
minLines: 4, minLines: 4,
maxLines: 6, maxLines: 6,
)), )),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: InkWell( child: InkWell(
onTap: /*model.doctorsList != null && onTap:
/*model.doctorsList != null &&
model.doctorsList.length > 0 model.doctorsList.length > 0
? () { ? () {
ListSelectDialog dialog = ListSelectDialog dialog =
@ -350,14 +371,18 @@ class _AdmissionRequestSecondScreenState
}, },
); );
} }
:*/ null, :*/
null,
child: TextField( child: TextField(
decoration: Helpers.textFieldSelectorDecoration( decoration:
TranslationBase.of(context).allergies, Helpers.textFieldSelectorDecoration(
/* _admissionType != null TranslationBase.of(context)
.allergies,
/* _admissionType != null
? _admissionType['DoctorName'] ? _admissionType['DoctorName']
:*/ null, :*/
true), null,
true),
enabled: false, enabled: false,
), ),
), ),
@ -374,8 +399,10 @@ class _AdmissionRequestSecondScreenState
child: AppButton( child: AppButton(
title: TranslationBase.of(context).next, title: TranslationBase.of(context).next,
color: HexColor("#B8382B"), color: HexColor("#B8382B"),
onPressed: (){ onPressed: () {
Navigator.of(context).pushNamed(PATIENT_ADMISSION_REQUEST_3, arguments: {'patient': patient}); Navigator.of(context).pushNamed(
PATIENT_ADMISSION_REQUEST_3,
arguments: {'patient': patient});
}, },
), ),
), ),

@ -415,43 +415,57 @@ class _TemperatureWidgetState extends State<TemperatureWidget> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).temperature} (C):", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).temperature} (C):",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.temperatureCelcius}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.temperatureCelcius}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).temperature} (F):", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).temperature} (F):",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.temperatureCelcius * (9 / 5) + 32}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.temperatureCelcius * (9 / 5) + 32}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
], ],
), ),
@ -534,44 +548,59 @@ class _PulseWidgetState extends State<PulseWidget> {
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).pulseBeats}", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).pulseBeats}",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.pulseBeatPerMinute}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.pulseBeatPerMinute}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).rhythm}", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).rhythm}",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.pulseRhythm}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.pulseRhythm}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
], ],
), ),
@ -628,43 +657,57 @@ class _RespirationWidgetState extends State<RespirationWidget> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).respBeats}", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).respBeats}",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.respirationBeatPerMinute}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.respirationBeatPerMinute}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).patternOfRespiration}", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).patternOfRespiration}",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.respirationPattern}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.respirationPattern}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
], ],
), ),
@ -721,43 +764,57 @@ class _BloodPressureWidgetState extends State<BloodPressureWidget> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).bloodPressureDiastoleAndSystole}", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).bloodPressureDiastoleAndSystole}",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.bloodPressureHigher}, ${widget.vitalSign.bloodPressureLower}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.bloodPressureHigher}, ${widget.vitalSign.bloodPressureLower}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).cuffLocation}", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).cuffLocation}",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.bloodPressureCuffLocation}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.bloodPressureCuffLocation}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
], ],
), ),
@ -766,44 +823,54 @@ class _BloodPressureWidgetState extends State<BloodPressureWidget> {
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).patientPosition}", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).patientPosition}",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.bloodPressurePatientPosition}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.bloodPressurePatientPosition}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
Row( Expanded(
children: [ child: Row(
AppText( children: [
"${TranslationBase.of(context).cuffSize}", AppText(
fontSize: SizeConfig.textMultiplier * 1.8, "${TranslationBase.of(context).cuffSize}",
color: Colors.black, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700, color: Colors.black,
), fontWeight: FontWeight.w700,
SizedBox( ),
width: 8, SizedBox(
), width: 8,
AppText( ),
"${widget.vitalSign.bloodPressureCuffSize}", AppText(
fontSize: SizeConfig.textMultiplier * 2, "${widget.vitalSign.bloodPressureCuffSize}",
color: Colors.grey.shade800, fontSize: SizeConfig.textMultiplier * 2,
fontWeight: FontWeight.normal, color: Colors.grey.shade800,
), fontWeight: FontWeight.normal,
], ),
],
),
), ),
], ],
), ),
@ -953,43 +1020,47 @@ class _PainScaleWidgetState extends State<PainScaleWidget> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Expanded(
children: [ child: Row(
AppText( children: [
"${TranslationBase.of(context).painScale}", AppText(
fontSize: SizeConfig.textMultiplier * 1.8, "${TranslationBase.of(context).painScale}",
color: Colors.black, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700, color: Colors.black,
), fontWeight: FontWeight.w700,
SizedBox( ),
width: 8, SizedBox(
), width: 8,
AppText( ),
"${widget.vitalSign.painScore}", AppText(
fontSize: SizeConfig.textMultiplier * 2, "${widget.vitalSign.painScore}",
color: Colors.grey.shade800, fontSize: SizeConfig.textMultiplier * 2,
fontWeight: FontWeight.normal, color: Colors.grey.shade800,
), fontWeight: FontWeight.normal,
], ),
],
),
), ),
Row( Expanded(
children: [ child: Row(
AppText( children: [
"${TranslationBase.of(context).painManagement}", AppText(
fontSize: SizeConfig.textMultiplier * 1.8, "${TranslationBase.of(context).painManagement}",
color: Colors.black, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700, color: Colors.black,
), fontWeight: FontWeight.w700,
SizedBox( ),
width: 8, SizedBox(
), width: 8,
AppText( ),
"${widget.vitalSign.isPainManagementDone}", AppText(
fontSize: SizeConfig.textMultiplier * 2, "${widget.vitalSign.isPainManagementDone}",
color: Colors.grey.shade800, fontSize: SizeConfig.textMultiplier * 2,
fontWeight: FontWeight.normal, color: Colors.grey.shade800,
), fontWeight: FontWeight.normal,
], ),
],
),
), ),
], ],
), ),

File diff suppressed because it is too large Load Diff

@ -33,452 +33,535 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient']; patient = routeArgs['patient'];
return BaseView<PrescriptionViewModel>( return BaseView<PrescriptionViewModel>(
onModelReady: (model) => model.getPrescription(), onModelReady: (model) => model.getPrescription(mrn: patient.patientMRN),
builder: (BuildContext context, PrescriptionViewModel model, builder:
Widget child) => (BuildContext context, PrescriptionViewModel model, Widget child) =>
AppScaffold( AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).prescription, appBarTitle: TranslationBase.of(context).prescription,
body: NetworkBaseView( body: NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
Padding( Padding(
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
AvatarWidget( AvatarWidget(
Icon( Icon(
patient.genderDescription == "Male" patient.genderDescription == "Male"
? DoctorApp.male ? DoctorApp.male
: DoctorApp.female_icon, : DoctorApp.female_icon,
size: 70, size: 70,
color: Colors.white, color: Colors.white,
),
),
SizedBox(
width: 20,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
patient.firstName + ' ' + patient.lastName,
color: Colors.black,
fontWeight: FontWeight.bold,
),
if (model.prescriptionList.length > 0)
Row(
children: [
AppText(
TranslationBase.of(context).age2,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 5.0,
),
AppText(
patient.age.toString(),
color: Colors.black,
fontWeight: FontWeight.normal,
),
],
), ),
AppText(
"ALLERGIC TO: FOOD, ASPIRIN",
color: Color(0xFFB9382C),
fontWeight: FontWeight.bold,
), ),
], SizedBox(
) width: 20,
], ),
), Column(
), crossAxisAlignment:
Divider( CrossAxisAlignment.start,
height: 1.0, children: [
thickness: 1.0, AppText(
color: Colors.grey, patient.firstName +
), ' ' +
if (model.prescriptionList.length != 0) patient.lastName,
SizedBox( color: Colors.black,
height: model.prescriptionList[0].rowcount == 0 fontWeight: FontWeight.bold,
? 200.0 ),
: 10.0), //if (model.prescriptionList.length > 0)
//model.prescriptionList == null Row(
if (model.prescriptionList.length != 0) children: [
model.prescriptionList[0].rowcount == 0 AppText(
? Column( TranslationBase.of(context).age2,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: [
InkWell(
onTap: () {
addPrescriptionForm(context, model);
//model.postPrescription();
},
child: CircleAvatar(
radius: 65,
backgroundColor: Color(0XFFB8382C),
child: CircleAvatar(
radius: 60,
backgroundColor: Colors.white,
child: Icon(
Icons.add,
color: Colors.black, color: Colors.black,
size: 45.0, fontWeight: FontWeight.bold,
), ),
), SizedBox(
width: 5.0,
),
AppText(
patient.age.toString(),
color: Colors.black,
fontWeight: FontWeight.normal,
),
],
), ),
), AppText(
SizedBox( "ALLERGIC TO: FOOD, ASPIRIN",
height: 15.0, color: Color(0xFFB9382C),
), fontWeight: FontWeight.bold,
Row( ),
mainAxisAlignment: ],
MainAxisAlignment.center, )
children: [ ],
AppText( ),
TranslationBase.of(context) ),
.noPrescriptionListed, Divider(
color: Colors.black, height: 1.0,
fontWeight: FontWeight.w900, thickness: 1.0,
), color: Colors.grey,
], ),
), (model.prescriptionList.length != 0)
Row( ? SizedBox(
mainAxisAlignment: height:
MainAxisAlignment.center, model.prescriptionList[0].rowcount == 0
children: [ ? 200.0
AppText( : 10.0)
TranslationBase.of(context).addNow, : SizedBox(height: 200.0),
color: Color(0XFFB8382C), //model.prescriptionList == null
fontWeight: FontWeight.w900, (model.prescriptionList.length != 0)
), ? model.prescriptionList[0].rowcount == 0
], ? Column(
), mainAxisAlignment:
], MainAxisAlignment.center,
) crossAxisAlignment:
: Padding( CrossAxisAlignment.stretch,
padding: EdgeInsets.all(14.0), children: [
child: NetworkBaseView( InkWell(
baseViewModel: model, onTap: () {
child: Column( addPrescriptionForm(
mainAxisAlignment: context, model, patient);
MainAxisAlignment.start, //model.postPrescription();
children: [ },
InkWell( child: CircleAvatar(
child: Container( radius: 65,
height: 50.0, backgroundColor:
width: 450.0, Color(0XFFB8382C),
decoration: BoxDecoration( child: CircleAvatar(
border: Border.all( radius: 60,
color: Colors.grey), backgroundColor: Colors.white,
borderRadius: child: Icon(
BorderRadius.circular(10.0), Icons.add,
), color: Colors.black,
child: Padding( size: 45.0,
padding: EdgeInsets.all(8.0), ),
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
AppText(
' Add more medication',
fontWeight: FontWeight.w100,
fontSize: 12.5,
),
Icon(
Icons.add,
color: Color(0XFFB8382C),
)
],
), ),
), ),
), ),
onTap: () { SizedBox(
addPrescriptionForm(context, model); height: 15.0,
//model.postPrescription(); ),
}, Row(
), mainAxisAlignment:
SizedBox( MainAxisAlignment.center,
height: 15.0, children: [
), AppText(
...List.generate( TranslationBase.of(context)
model.prescriptionList[0].rowcount, .noPrescriptionListed,
(index) => Container( color: Colors.black,
//height: 240, fontWeight: FontWeight.w900,
child: Column( ),
children: [ ],
Row( ),
mainAxisAlignment: Row(
MainAxisAlignment mainAxisAlignment:
.spaceBetween, MainAxisAlignment.center,
// crossAxisAlignment: children: [
// CrossAxisAlignment.start, AppText(
children: [ TranslationBase.of(context)
Container( .addNow,
height: color: Color(0XFFB8382C),
MediaQuery.of(context) fontWeight: FontWeight.w900,
.size ),
.height * ],
0.23, ),
width: ],
MediaQuery.of(context) )
.size : Padding(
.width * padding: EdgeInsets.all(14.0),
0.09, child: NetworkBaseView(
child: Column( baseViewModel: model,
children: [ child: Column(
AppText( mainAxisAlignment:
'8\nDEC', MainAxisAlignment.start,
color: Colors.green, children: [
) InkWell(
], child: Container(
), height: 50.0,
width: 450.0,
decoration: BoxDecoration(
border: Border.all(
color: Colors.grey),
borderRadius:
BorderRadius.circular(
10.0),
),
child: Padding(
padding:
EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
AppText(
' Add more medication',
fontWeight:
FontWeight.w100,
fontSize: 12.5,
),
Icon(
Icons.add,
color:
Color(0XFFB8382C),
)
],
), ),
Container( ),
height: ),
MediaQuery.of(context) onTap: () {
.size addPrescriptionForm(
.height * context, model, patient);
0.282, //model.postPrescription();
width: },
MediaQuery.of(context) ),
.size SizedBox(
.width * height: 15.0,
0.77, ),
child: Column( ...List.generate(
model.prescriptionList[0]
.rowcount,
(index) => Container(
//height: 240,
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
// crossAxisAlignment:
// CrossAxisAlignment.start,
children: [ children: [
Row( Container(
children: [ height: MediaQuery.of(
AppText( context)
'Start Date:', .size
fontWeight: .height *
FontWeight 0.23,
.w700, width: MediaQuery.of(
fontSize: 14.0, context)
), .size
Expanded( .width *
child: AppText( 0.09,
model child: Column(
.prescriptionList[ children: [
0] AppText(
.entityList[ '8\nDEC',
index] color: Colors
.startDate, .green,
fontSize: )
12.0, ],
),
),
Container(
height: MediaQuery.of(
context)
.size
.height *
0.282,
width: MediaQuery.of(
context)
.size
.width *
0.77,
child: Column(
children: [
Row(
children: [
AppText(
'Start Date:',
fontWeight:
FontWeight
.w700,
fontSize:
14.0,
),
Expanded(
child:
AppText(
model
.prescriptionList[0]
.entityList[index]
.startDate,
fontSize:
12.0,
),
),
SizedBox(
width:
6.0,
),
AppText(
'Order Type:',
fontWeight:
FontWeight
.w700,
fontSize:
14.0,
),
Expanded(
child:
AppText(
model
.prescriptionList[0]
.entityList[index]
.orderTypeDescription,
fontSize:
13.0,
),
),
],
), ),
), SizedBox(
SizedBox( height: 5.5,
width: 6.0,
),
AppText(
'Order Type:',
fontWeight:
FontWeight
.w700,
fontSize: 14.0,
),
Expanded(
child: AppText(
model
.prescriptionList[
0]
.entityList[
index]
.orderTypeDescription,
fontSize:
13.0,
), ),
), Row(
], children: [
), Container(
SizedBox( child:
height: 5.5, Expanded(
), child:
Row( AppText(
children: [ model
Container( .prescriptionList[0]
child: Expanded( .entityList[index]
child: .medicationName,
AppText( fontWeight:
model FontWeight.w700,
.prescriptionList[ fontSize:
0] 15.0,
.entityList[ ),
index] ),
.medicationName, )
fontWeight: ],
FontWeight
.w700,
fontSize:
15.0,
),
), ),
) SizedBox(
], height: 5.5,
),
SizedBox(
height: 5.5,
),
Row(
children: [
Expanded(
child: AppText(
model
.prescriptionList[
0]
.entityList[
index]
.doseDetail,
fontSize:
15.0,
), ),
) Row(
], children: [
), Expanded(
SizedBox( child:
height: 3.0, AppText(
), model
Row( .prescriptionList[0]
children: [ .entityList[index]
AppText( .doseDetail,
'Indication: ', fontSize:
fontWeight: 15.0,
FontWeight ),
.w700, )
fontSize: 17.0, ],
),
Expanded(
child: AppText(
model
.prescriptionList[
0]
.entityList[
index]
.indication,
fontSize:
15.0),
)
],
),
SizedBox(
height: 18.0,
),
Row(
children: [
Expanded(
child: AppText(
model
.prescriptionList[
0]
.entityList[
index]
.doctorName,
fontWeight:
FontWeight
.w700,
), ),
) SizedBox(
], height: 3.0,
), ),
Row( Row(
children: [ children: [
Expanded( AppText(
child: AppText( 'Indication: ',
model fontWeight:
.prescriptionList[ FontWeight
0] .w700,
.entityList[ fontSize:
index] 17.0,
.remarks, ),
fontSize: Expanded(
14.0, child: AppText(
model
.prescriptionList[0]
.entityList[index]
.indication,
fontSize: 15.0),
)
],
),
SizedBox(
height: 18.0,
),
Row(
children: [
Expanded(
child:
AppText(
model
.prescriptionList[0]
.entityList[index]
.doctorName,
fontWeight:
FontWeight.w700,
),
)
],
),
Row(
children: [
Expanded(
child:
AppText(
model
.prescriptionList[0]
.entityList[index]
.remarks,
fontSize:
14.0,
),
),
],
),
SizedBox(
height: 10.0,
), ),
),
],
),
SizedBox(
height: 10.0,
),
Divider( Divider(
height: 0, height: 0,
thickness: 1.0, thickness:
color: Colors.grey, 1.0,
color: Colors
.grey,
),
// SizedBox(
// height: 40,
// ),
],
),
), ),
// SizedBox( Container(
// height: 40, height: MediaQuery.of(
// ), context)
], .size
), .height *
), 0.05,
Container( width: MediaQuery.of(
height: context)
MediaQuery.of(context) .size
.size .width *
.height * 0.06,
0.05, child: Column(
width: children: [
MediaQuery.of(context) InkWell(
.size child: Icon(
.width * Icons
0.06, .edit),
child: Column( onTap: () {
children: [ updatePrescriptionForm(
InkWell( context,
child: Icon( model
Icons.edit), .prescriptionList[
onTap: () { 0]
updatePrescriptionForm( .entityList[
context, index]
model .medicationName,
.prescriptionList[ model
0] .prescriptionList[
.entityList[ 0]
index] .entityList[
.medicationName, index]
model .medicineCode,
.prescriptionList[ model,
0] );
.entityList[ //model.postPrescription();
index] },
.medicineCode, ),
model, ],
); ),
//model.postPrescription();
},
), ),
], ],
), ),
), ],
], ),
), ),
], ),
],
),
),
)
: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: [
InkWell(
onTap: () {
addPrescriptionForm(
context, model, patient);
//model.postPrescription();
},
child: CircleAvatar(
radius: 65,
backgroundColor: Color(0XFFB8382C),
child: CircleAvatar(
radius: 60,
backgroundColor: Colors.white,
child: Icon(
Icons.add,
color: Colors.black,
size: 45.0,
), ),
), ),
), ),
], ),
), SizedBox(
), height: 15.0,
) ),
], Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context)
.noPrescriptionListed,
color: Colors.black,
fontWeight: FontWeight.w900,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).addNow,
color: Color(0XFFB8382C),
fontWeight: FontWeight.w900,
),
],
),
],
)
],
),
),
), ),
), )),
),
)),
); );
} }
selectDate(BuildContext context, PrescriptionViewModel model) async {
DateTime selectedDate;
selectedDate = DateTime.now();
final DateTime picked = await showDatePicker(
context: context,
initialDate: selectedDate,
firstDate: DateTime.now().add(Duration(hours: 2)),
lastDate: DateTime(2040),
initialEntryMode: DatePickerEntryMode.calendar,
);
if (picked != null && picked != selectedDate) {
setState(() {
selectedDate = picked;
});
}
}
void updatePrescriptionForm( void updatePrescriptionForm(
context, String drugName, int drugId, PrescriptionViewModel model) { context, String drugName, int drugId, PrescriptionViewModel model) {
TextEditingController remarksController = TextEditingController(); TextEditingController remarksController = TextEditingController();
@ -637,7 +720,8 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
updatePrescriptionReqModel.prescriptionRequestModel = sss; updatePrescriptionReqModel.prescriptionRequestModel = sss;
//postProcedureReqModel.procedures = controlsProcedure; //postProcedureReqModel.procedures = controlsProcedure;
await model.updatePrescription(updatePrescriptionReqModel); await model.updatePrescription(
updatePrescriptionReqModel, patient.patientMRN);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);

@ -509,7 +509,7 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
baseViewModel: widget.model, baseViewModel: widget.model,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
height: 790, height: 810,
child: Padding( child: Padding(
padding: EdgeInsets.all(12.0), padding: EdgeInsets.all(12.0),
child: Column( child: Column(
@ -566,7 +566,7 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
maxLines: 5, maxLines: 5,
), ),
SizedBox( SizedBox(
height: 80.0, height: 50.0,
), ),
Container( Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),

@ -544,6 +544,15 @@ class TranslationBase {
localizedValues['referralEmptyMsg'][locale.languageCode]; localizedValues['referralEmptyMsg'][locale.languageCode];
String get referralSuccessMsg => String get referralSuccessMsg =>
localizedValues['referralSuccessMsg'][locale.languageCode]; localizedValues['referralSuccessMsg'][locale.languageCode];
String get diagnoseType => localizedValues['diagnoseType'][locale.languageCode];
String get condition => localizedValues['condition'][locale.languageCode];
String get id => localizedValues['id'][locale.languageCode];
String get quantity => localizedValues['quantity'][locale.languageCode];
String get codeNo => localizedValues['codeNo'][locale.languageCode];
String get covered => localizedValues['covered'][locale.languageCode];
String get approvalRequired => localizedValues['approvalRequired'][locale.languageCode];
String get uncoveredByDoctor => localizedValues['uncoveredByDoctor'][locale.languageCode];
String get chiefComplaintEmptyMsg => localizedValues['chiefComplaintEmptyMsg'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -66,10 +66,13 @@ class _ListSelectDialogState extends State<ListSelectDialog> {
...widget.list ...widget.list
.map((item) => RadioListTile( .map((item) => RadioListTile(
title: Text("${item[widget.attributeName].toString()}"), title: Text("${item[widget.attributeName].toString()}"),
groupValue: widget.selectedValue[widget.attributeValueId].toString(), groupValue: widget.selectedValue[widget.attributeValueId]
.toString(),
value: item[widget.attributeValueId].toString(), value: item[widget.attributeValueId].toString(),
activeColor: Colors.blue.shade700, activeColor: Colors.blue.shade700,
selected: item[widget.attributeValueId].toString() == widget.selectedValue[widget.attributeValueId].toString(), selected: item[widget.attributeValueId].toString() ==
widget.selectedValue[widget.attributeValueId]
.toString(),
onChanged: (val) { onChanged: (val) {
setState(() { setState(() {
widget.selectedValue = item; widget.selectedValue = item;

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

Loading…
Cancel
Save