Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into soap_update

 Conflicts:
	lib/config/localized_values.dart
	lib/util/translations_delegate_base.dart
pull/234/head
Elham Rababah 5 years ago
commit ffe7e7c57f

@ -504,11 +504,29 @@ const Map<String, Map<String, String>> localizedValues = {
'itemExist': {'en': "This item already exist", 'ar': "هذا العنصر موجود"}, 'itemExist': {'en': "This item already exist", 'ar': "هذا العنصر موجود"},
'selectAllergy': {'en': "Select Allergy", 'ar': "أختر الحساسية"}, 'selectAllergy': {'en': "Select Allergy", 'ar': "أختر الحساسية"},
'selectSeverity': {'en': "Select Severity", 'ar': "أختر الدرجه"}, 'selectSeverity': {'en': "Select Severity", 'ar': "أختر الدرجه"},
'medications': {'en': "Medications", 'ar':"الأدوية" }, 'leaveCreated': {'en': "Leave has been created", 'ar': "تم إنشاء الإجازة"},
'procedures': {'en': "Procedures", 'ar':"الإجراءات" }, 'medications': {'en': "Medications", 'ar': "الأدوية"},
'vitalSignEmptyMsg': {'en': "There is no vital signs for this patient", 'ar':"لا توجد علامات حيوية لهذا المريض" }, 'procedures': {'en': "Procedures", 'ar': "الإجراءات"},
'referralEmptyMsg': {'en': "There is no referral data", 'ar':"لا توجد بيانات إحالة" }, 'vitalSignEmptyMsg': {
'referralSuccessMsg': {'en': "You make referral successfully", 'ar':"You make referral successfully" }, 'en': "There is no vital signs for this patient",
'ar': "لا توجد علامات حيوية لهذا المريض"
},
'referralEmptyMsg': {
'en': "There is no referral data",
'ar': "لا توجد بيانات إحالة"
},
'referralSuccessMsg': {
'en': "You make referral successfully",
'ar': "You make referral successfully"
},
'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':"غير مغطى من قبل الدكتور" },
'addAssessment': {'en': "Add ASSESSMENT", 'ar':"أضف التقييم" }, 'addAssessment': {'en': "Add ASSESSMENT", 'ar':"أضف التقييم" },
'assessment': {'en': "ASSESSMENT", 'ar':" التقييم" }, 'assessment': {'en': "ASSESSMENT", '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,

@ -59,7 +59,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]);
} }
} }
}, },

@ -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);

@ -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) {

@ -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;

@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/widgets/shared/Text.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:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
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';
@ -16,21 +17,42 @@ class MedicalFileDetails extends StatefulWidget {
String firstName; String firstName;
String lastName; String lastName;
String gender; String gender;
MedicalFileDetails({this.age, this.firstName, this.lastName, this.gender}); int encounterNumber;
int pp;
MedicalFileDetails(
{this.age,
this.firstName,
this.lastName,
this.gender,
this.encounterNumber,
this.pp});
@override @override
_MedicalFileDetailsState createState() => _MedicalFileDetailsState( _MedicalFileDetailsState createState() => _MedicalFileDetailsState(
firstName: firstName, age: age, lastName: lastName, gender: gender); firstName: firstName,
age: age,
lastName: lastName,
gender: gender,
encounterNumber: encounterNumber,
pp: pp);
} }
class _MedicalFileDetailsState extends State<MedicalFileDetails> { class _MedicalFileDetailsState extends State<MedicalFileDetails> {
int encounterNumber;
String age; String age;
String firstName; String firstName;
String lastName; String lastName;
String gender; String gender;
int pp;
_MedicalFileDetailsState( _MedicalFileDetailsState(
{this.age, this.firstName, this.lastName, this.gender}); {this.age,
this.firstName,
this.lastName,
this.gender,
this.encounterNumber,
this.pp});
bool isPhysicalExam = false; bool isPhysicalExam = false;
bool isProcedureExpand = false; bool isProcedureExpand = false;
bool isHistoryExpand = false; bool isHistoryExpand = false;
@ -39,13 +61,15 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<MedicalFileViewModel>( return BaseView<MedicalFileViewModel>(
//onModelReady: (model) => model.getMedicalFile(), onModelReady: (model) => model.getMedicalFile(mrn: pp),
builder: builder:
(BuildContext context, MedicalFileViewModel model, Widget child) => (BuildContext context, MedicalFileViewModel model, Widget child) =>
AppScaffold( AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'medical file'.toUpperCase(), appBarTitle: 'medical file'.toUpperCase(),
body: SingleChildScrollView( body: NetworkBaseView(
baseViewModel: model,
child: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
@ -111,17 +135,23 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
'Visit Date : ', 'Visit Date : ',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
AppText( if (model.medicalFileList.length != 0)
'23/12/2020', AppText(model
), .medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.appointmentDate
.toString()),
SizedBox(width: 35.0), SizedBox(width: 35.0),
AppText( // AppText(
'Appt Date : ', // 'Appt Date : ',
fontWeight: FontWeight.w700, // fontWeight: FontWeight.w700,
), // ),
AppText( // AppText(
'23/12/2020', // '23/12/2020',
), // ),
], ],
), ),
Row( Row(
@ -130,20 +160,36 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
'Doctor : '.toUpperCase(), 'Doctor : '.toUpperCase(),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
if (model.medicalFileList.length != 0)
AppText( AppText(
'Muhammad assad'.toUpperCase(), model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.doctorName
.toUpperCase(),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
], ],
), ),
if (model.medicalFileList.length != 0)
Row( Row(
children: [ children: [
AppText( AppText(
'Clinic : ', 'Clinic : ',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
if (model.medicalFileList.length != 0)
AppText( AppText(
'Gastroenterology', model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.clinicName,
), ),
], ],
), ),
@ -153,8 +199,16 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
'Episode Number : ', 'Episode Number : ',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
if (model.medicalFileList.length != 0)
AppText( AppText(
'200012334', model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.episodeID
.toString(),
), ),
], ],
), ),
@ -165,9 +219,11 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
color: Colors.grey.shade400, color: Colors.grey.shade400,
), ),
SizedBox(height: 25.0), SizedBox(height: 25.0),
if (model.medicalFileList.length != 0)
HeaderBodyExpandableNotifier( HeaderBodyExpandableNotifier(
headerWidget: Row( headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
@ -191,12 +247,51 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
: EvaIcons.plus)) : EvaIcons.plus))
], ],
), ),
bodyWidget: Column( bodyWidget: ListView.builder(
//physics: ,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstMedicalHistory
.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Container(
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
children: [ children: [
Texts( Row(
'Ms J. K. is an 83 year old retired nurse with a long history of hypertension that was previously well controlled on diuretic therapy. She was first admitted to CPMC in 1995 when she presented with a complaint of intermittent midsternal chest pain.') children: [
Expanded(
child: AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstMedicalHistory[
index]
.history
.trim(),
),
),
SizedBox(width: 35.0),
],
),
], ],
), ),
),
);
}),
isExpand: isHistoryExpand, isExpand: isHistoryExpand,
), ),
SizedBox( SizedBox(
@ -210,23 +305,28 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
SizedBox( SizedBox(
height: 30, height: 30,
), ),
if (model.medicalFileList.length != 0)
HeaderBodyExpandableNotifier( HeaderBodyExpandableNotifier(
headerWidget: Row( headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
Texts('assessment'.toUpperCase(), Texts('assessment'.toUpperCase(),
variant: variant: isAssessmentExpand
isAssessmentExpand ? "bodyText" : '', ? "bodyText"
bold: isAssessmentExpand ? true : false, : '',
bold:
isAssessmentExpand ? true : false,
color: Colors.black), color: Colors.black),
], ],
), ),
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
isAssessmentExpand = !isAssessmentExpand; isAssessmentExpand =
!isAssessmentExpand;
}); });
}, },
child: Icon(isAssessmentExpand child: Icon(isAssessmentExpand
@ -234,11 +334,122 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
: EvaIcons.plus)) : EvaIcons.plus))
], ],
), ),
bodyWidget: Column( bodyWidget: ListView.builder(
//physics: ,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstAssessments
.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Container(
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Row(
children: [
AppText(
'ICD',
fontWeight: FontWeight.w700,
),
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstAssessments[index]
.iCD10
.trim(),
),
SizedBox(width: 35.0),
AppText(
'Condition: ',
fontWeight: FontWeight.w700,
),
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstAssessments[index]
.condition
.trim(),
),
],
),
Row(
children: [ children: [
Texts('ssss'), AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstAssessments[index]
.description,
fontWeight: FontWeight.w700,
)
],
),
Row(
children: [
AppText(
'Type: ',
fontWeight: FontWeight.w700,
),
AppText(model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstAssessments[index]
.type),
],
),
SizedBox(
height: 15.0,
),
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstAssessments[index]
.remarks
.trim(),
),
Divider(
height: 1,
color: Colors.grey,
thickness: 1.0,
),
SizedBox(
height: 8.0,
),
], ],
), ),
),
);
}),
isExpand: isAssessmentExpand, isExpand: isAssessmentExpand,
), ),
SizedBox( SizedBox(
@ -252,23 +463,28 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
SizedBox( SizedBox(
height: 30, height: 30,
), ),
if (model.medicalFileList.length != 0)
HeaderBodyExpandableNotifier( HeaderBodyExpandableNotifier(
headerWidget: Row( headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
Texts('Test / procedures'.toUpperCase(), Texts('Test / procedures'.toUpperCase(),
variant: variant: isProcedureExpand
isProcedureExpand ? "bodyText" : '', ? "bodyText"
bold: isProcedureExpand ? true : false, : '',
bold:
isProcedureExpand ? true : false,
color: Colors.black), color: Colors.black),
], ],
), ),
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
isProcedureExpand = !isProcedureExpand; isProcedureExpand =
!isProcedureExpand;
}); });
}, },
child: Icon(isProcedureExpand child: Icon(isProcedureExpand
@ -276,52 +492,111 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
: EvaIcons.plus)) : EvaIcons.plus))
], ],
), ),
bodyWidget: Column( bodyWidget: ListView.builder(
//physics: ,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstProcedure
.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Container(
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
children: [ children: [
SizedBox(
height: 20.0,
),
Row( Row(
children: [ children: [
AppText( AppText(
'Exam Type : ', 'Procedure ID: ',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
AppText( AppText(
'59', model
.medicalFileList[0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstProcedure[index]
.procedureId
.trim(),
), ),
], SizedBox(width: 35.0),
),
Row(
children: [
AppText( AppText(
'ABDOMEN', 'Order Date: ',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
// AppText(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[0]
// .timeLineEvents[0]
// .consulations[0]
// .lstProcedure[index]
// .orderDate
// .trim(),
// ),
], ],
), ),
Row( Row(
children: [ children: [
AppText( AppText(
'Abnormal: ', model
.medicalFileList[0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstProcedure[index]
.procName,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), )
AppText(
'no',
),
], ],
), ),
SizedBox(height: 15.0),
Row( Row(
children: [ children: [
AppText( AppText(
'Some short remark about the allergy', 'CPT Code : ',
fontWeight: FontWeight.w300, fontWeight: FontWeight.w700,
), ),
AppText(model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstProcedure[index]
.patientID
.toString()),
], ],
), ),
SizedBox(
height: 15.0,
),
Divider(
height: 1,
color: Colors.grey,
thickness: 1.0,
),
SizedBox(
height: 8.0,
),
], ],
), ),
),
);
}),
isExpand: isProcedureExpand, isExpand: isProcedureExpand,
), ),
SizedBox( SizedBox(
@ -335,14 +610,17 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
SizedBox( SizedBox(
height: 30, height: 30,
), ),
if (model.medicalFileList.length != 0)
HeaderBodyExpandableNotifier( HeaderBodyExpandableNotifier(
headerWidget: Row( headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
Texts('physical exam'.toUpperCase(), Texts('physical exam'.toUpperCase(),
variant: isPhysicalExam ? "bodyText" : '', variant:
isPhysicalExam ? "bodyText" : '',
bold: isPhysicalExam ? true : false, bold: isPhysicalExam ? true : false,
color: Colors.black), color: Colors.black),
], ],
@ -358,28 +636,54 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
: EvaIcons.plus)) : EvaIcons.plus))
], ],
), ),
bodyWidget: Column( bodyWidget: ListView.builder(
//physics: ,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstPhysicalExam
.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Container(
child: Column(
children: [ children: [
SizedBox(
height: 20.0,
),
Row( Row(
children: [ children: [
AppText( AppText(
'Exam Type : ', 'Exam Type: ',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
AppText( AppText(model
'59', .medicalFileList[0]
), .entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstPhysicalExam[index]
.examType),
], ],
), ),
Row( Row(
children: [ children: [
AppText( AppText(
'ABDOMEN', model
.medicalFileList[0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstPhysicalExam[index]
.examDesc,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), )
], ],
), ),
Row( Row(
@ -388,22 +692,42 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
'Abnormal: ', 'Abnormal: ',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
AppText( AppText(model
'no', .medicalFileList[0]
), .entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstPhysicalExam[index]
.abnormal),
], ],
), ),
SizedBox(height: 15.0), SizedBox(
Row( height: 15.0,
children: [ ),
AppText( AppText(
'Some short remark about the allergy', model
fontWeight: FontWeight.w300, .medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstPhysicalExam[index]
.remarks,
), ),
], Divider(
height: 1,
color: Colors.grey,
thickness: 1.0,
),
SizedBox(
height: 8.0,
), ),
], ],
), ),
),
);
}),
isExpand: isPhysicalExam, isExpand: isPhysicalExam,
), ),
SizedBox( SizedBox(
@ -423,6 +747,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
), ),
), ),
), ),
),
); );
} }
} }

@ -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,6 +30,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
appBarTitle: 'medical Report'.toUpperCase(), appBarTitle: 'medical Report'.toUpperCase(),
body: NetworkBaseView( body: NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
@ -89,10 +90,13 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
thickness: 1.0, thickness: 1.0,
color: Colors.grey, color: Colors.grey,
), ),
if (model.medicalFileList.length != 0)
ListView.builder( ListView.builder(
//physics: ,
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
itemCount: 2, itemCount: model
.medicalFileList[0].entityList[0].timelines.length,
itemBuilder: (BuildContext ctxt, int index) { itemBuilder: (BuildContext ctxt, int index) {
return Padding( return Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
@ -107,10 +111,11 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
'Branch : ', 'Branch : ',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
AppText( AppText(model
model.medicalFileList[0].entityList[0] .medicalFileList[0]
.admissions[index].projectName, .entityList[0]
), .timelines[index]
.projectName),
], ],
), ),
Row( Row(
@ -121,8 +126,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
), ),
AppText( AppText(
model.medicalFileList[0].entityList[0] model.medicalFileList[0].entityList[0]
.admissions[index].doctor .timelines[index].doctorName,
.toUpperCase(),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
], ],
@ -135,7 +139,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
), ),
AppText( AppText(
model.medicalFileList[0].entityList[0] model.medicalFileList[0].entityList[0]
.admissions[index].clinic, .timelines[index].clinicName,
), ),
], ],
), ),
@ -157,6 +161,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
firstName: patient.firstName, firstName: patient.firstName,
lastName: patient.lastName, lastName: patient.lastName,
gender: patient.genderDescription, gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientMRN,
)), )),
); );
}, },
@ -168,6 +174,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
), ),
), ),
), ),
),
); );
} }
} }

@ -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,
),
],
);
}
} }

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

@ -10,6 +10,7 @@ import 'package:doctor_app_flutter/screens/prescription/prescription_screen.dart
import 'package:doctor_app_flutter/screens/prescription/prescription_warnings.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_warnings.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.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/dynamic_elements.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
@ -17,14 +18,51 @@ 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:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
void addPrescriptionForm(context, PrescriptionViewModel model) { class AddPrescriptionFormScreen extends StatefulWidget {
@override
_AddPrescriptionFormScreenState createState() =>
_AddPrescriptionFormScreenState();
}
class _AddPrescriptionFormScreenState extends State<AddPrescriptionFormScreen> {
PrescriptionViewModel model = PrescriptionViewModel();
// PostPrescriptionReqModel addPrescriptionModel = PostPrescriptionReqModel();
// List<PrescriptionRequestModel> sss = List();
// void _presentDatePicker(id) {
// showDatePicker(
// context: context,
// initialDate: DateTime.now(),
// firstDate: DateTime(2019),
// lastDate: DateTime(2050),
// ).then((pickedDate) {
// if (pickedDate == null) {
// return;
// }
// setState(() {
// // var selectedDate = DateFormat.yMd().format(pickedDate);
// final df = new DateFormat('yyyy-MM-dd');
// model.startDate = df.format(pickedDate);
//
// strengthController.text = sss.add(PrescriptionRequestModel(doseStartDate: ''));
// //addSickLeave.startDate = selectedDate;
// });
// });
// }
@override
Widget build(BuildContext context) {
return addPrescriptionForm(context, model);
}
}
addPrescriptionForm(context, PrescriptionViewModel model) {
TextEditingController durationController = TextEditingController(); TextEditingController durationController = TextEditingController();
TextEditingController strengthController = TextEditingController(); TextEditingController strengthController = TextEditingController();
TextEditingController routeController = TextEditingController(); TextEditingController routeController = TextEditingController();
TextEditingController frequencyController = TextEditingController(); TextEditingController frequencyController = TextEditingController();
TextEditingController indicationController = TextEditingController(); TextEditingController indicationController = TextEditingController();
TextEditingController instructions = TextEditingController(); TextEditingController instructionController = TextEditingController();
TextEditingController drugIdController = TextEditingController(); TextEditingController drugIdController = TextEditingController();
TextEditingController doseController = TextEditingController(); TextEditingController doseController = TextEditingController();
@ -267,10 +305,12 @@ void addPrescriptionForm(context, PrescriptionViewModel model) {
width: 1.0, width: 1.0,
color: HexColor("#CCCCCC"))), color: HexColor("#CCCCCC"))),
child: TextFields( child: TextFields(
maxLines: 6,
minLines: 4,
hintText: TranslationBase.of(context) hintText: TranslationBase.of(context)
.instruction, .instruction,
controller: indicationController, controller: instructionController,
keyboardType: TextInputType.number, //keyboardType: TextInputType.number,
validator: (value) { validator: (value) {
if (value.isEmpty) if (value.isEmpty)
return TranslationBase.of(context) return TranslationBase.of(context)

@ -45,23 +45,49 @@ class AddRescheduleLeavScreen extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppTextFormField( InkWell(
hintText: child: Row(
TranslationBase.of(context).requestLeave, children: [
borderColor: Colors.white, Expanded(
prefix: IconButton( flex: 4,
child: AppText(
TranslationBase.of(context)
.requestLeave),
),
IconButton(
icon: Icon( icon: Icon(
Icons.add_circle, Icons.add_circle,
color: Colors.red, color: Colors.red,
)), ))
textInputType: TextInputType.text, ],
)
// AppTextFormField(
// hintText:
// TranslationBase.of(context).requestLeave,
// borderColor: Colors.white,
// prefix: IconButton(
// icon: Icon(
// Icons.add_circle,
// color: Colors.red,
// )),
// // textInputType: TextInputType.text,
// readOnly: true,
// onTap: () {
// openLeave(
// context,
// false,
// );
// return false;
// },
// inputFormatter: ONLY_LETTERS,
// )
,
onTap: () { onTap: () {
openLeave( openLeave(
context, context,
false, false,
); );
}, },
inputFormatter: ONLY_LETTERS,
) )
], ],
), ),
@ -158,7 +184,7 @@ class AddRescheduleLeavScreen extends StatelessWidget {
AppText(getDoctor( AppText(getDoctor(
model model
.coveringDoctors, .coveringDoctors,
item.doctorId)) item.coveringDoctorId))
]) ])
: SizedBox(), : SizedBox(),
AppText( AppText(
@ -272,7 +298,7 @@ class AddRescheduleLeavScreen extends StatelessWidget {
getDoctor(model, doctorId) { getDoctor(model, doctorId) {
var obj; var obj;
obj = model.where((i) => i['doctorID'] == doctorId).toList(); obj = model.where((i) => i['doctorID'].toString() == doctorId).toList();
print(obj); print(obj);
return obj.length > 0 ? obj[0]['doctorName'] : ""; return obj.length > 0 ? obj[0]['doctorName'] : "";

@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart'; import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/text_validator.dart'; import 'package:doctor_app_flutter/util/text_validator.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -50,10 +51,11 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
var clinicID; var clinicID;
TextEditingController _controller4; TextEditingController _controller4;
void _presentDatePicker(id) { void _presentDatePicker(id) {
var date = new DateTime.now();
showDatePicker( showDatePicker(
context: context, context: context,
initialDate: DateTime.now(), initialDate: new DateTime(date.year, date.month, date.day + 15),
firstDate: DateTime.now(), firstDate: new DateTime(date.year, date.month, date.day + 15),
lastDate: DateTime(2050), lastDate: DateTime(2050),
).then((pickedDate) { ).then((pickedDate) {
if (pickedDate == null) { if (pickedDate == null) {
@ -130,10 +132,12 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
child: DropdownButton( child: DropdownButton(
focusColor: Colors.grey, focusColor: Colors.grey,
isExpanded: true, isExpanded: true,
dropdownColor:
Colors.grey,
value: getClinicName( value: getClinicName(
model) ?? model) ??
"", "",
iconSize: 40, iconSize: 0,
elevation: 16, elevation: 16,
selectedItemBuilder: selectedItemBuilder:
(BuildContext (BuildContext
@ -151,8 +155,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
fontSize: SizeConfig fontSize: SizeConfig
.textMultiplier * .textMultiplier *
2.1, 2.1,
color: color: Colors
Colors.grey, .grey[500],
), ),
], ],
); );
@ -234,7 +238,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
child: child:
DropdownButtonHideUnderline( DropdownButtonHideUnderline(
child: DropdownButton( child: DropdownButton(
focusColor: Colors.grey, // focusColor: Colors.grey,
isExpanded: true, isExpanded: true,
value: offTime == null value: offTime == null
? model2.allOffTime[0] ? model2.allOffTime[0]
@ -256,8 +260,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
fontSize: SizeConfig fontSize: SizeConfig
.textMultiplier * .textMultiplier *
2.1, 2.1,
color: // color:
Colors.grey, // Colors.grey,
), ),
], ],
); );
@ -560,8 +564,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
fontSize: SizeConfig fontSize: SizeConfig
.textMultiplier * .textMultiplier *
2.1, 2.1,
color: // color:
Colors.grey, // Colors.grey,
), ),
], ],
); );
@ -654,8 +658,6 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
fontSize: SizeConfig fontSize: SizeConfig
.textMultiplier * .textMultiplier *
2.1, 2.1,
color:
Colors.grey,
), ),
], ],
); );
@ -731,9 +733,10 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
getProfile() async { getProfile() async {
Map p = await sharedPref.getObj(DOCTOR_PROFILE); Map p = await sharedPref.getObj(DOCTOR_PROFILE);
setState(() { setState(() {
if (widget.updateData != null) {
this.profile = p; this.profile = p;
if (widget.updateData != null) {
this.clinicID = widget.updateData.clinicId; this.clinicID = widget.updateData.clinicId;
_toDateController.text = widget.updateData.dateTimeFrom; _toDateController.text = widget.updateData.dateTimeFrom;
@ -756,7 +759,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
"requisitionNo": 0, "requisitionNo": 0,
"requisitionType": offTime, "requisitionType": offTime,
"clinicId": this.profile['ClinicID'], "clinicId": this.profile['ClinicID'],
"doctorId": this.profile['ClinicID'], "doctorId": this.profile['DoctorID'],
"dateTimeFrom": df.format(fromDate), "dateTimeFrom": df.format(fromDate),
"dateTimeTo": df.format(toDate), "dateTimeTo": df.format(toDate),
"date": df.format(DateTime.now()), "date": df.format(DateTime.now()),
@ -779,7 +782,9 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
}; };
model.addReschedule(request).then((response) { model.addReschedule(request).then((response) {
print(response); DrAppToastMsg.showSuccesToast(TranslationBase.of(context).leaveCreated);
Navigator.pop(context);
model.getRescheduleLeave();
}); });
} }
@ -790,7 +795,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
"requisitionNo": 0, "requisitionNo": 0,
"requisitionType": offTime, "requisitionType": offTime,
"clinicId": this.profile['ClinicID'], "clinicId": this.profile['ClinicID'],
"doctorId": this.profile['ClinicID'], "doctorId": this.profile['DoctorID'],
"dateTimeFrom": df.format(fromDate), "dateTimeFrom": df.format(fromDate),
"dateTimeTo": df.format(toDate), "dateTimeTo": df.format(toDate),
"date": df.format(DateTime.now()), "date": df.format(DateTime.now()),

@ -203,7 +203,7 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
value: getClinicName( value: getClinicName(
model) ?? model) ??
"", "",
iconSize: 40, iconSize: 0,
elevation: 16, elevation: 16,
selectedItemBuilder: selectedItemBuilder:
(BuildContext (BuildContext
@ -221,6 +221,8 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
fontSize: SizeConfig fontSize: SizeConfig
.textMultiplier * .textMultiplier *
2.1, 2.1,
color:
Colors.grey,
), ),
], ],
); );
@ -310,18 +312,19 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
// TranslationBase.of(context).remarks, // TranslationBase.of(context).remarks,
// fontSize: 10, // fontSize: 10,
// ), // ),
AppTextFormField( TextField(
borderColor: Colors.white, maxLines: 3,
decoration: InputDecoration(
contentPadding: EdgeInsets.all(20.0),
border: InputBorder.none,
hintText: widget.extendedData != null hintText: widget.extendedData != null
? widget.extendedData.remarks ? widget.extendedData.remarks
: TranslationBase.of(context).remarks, : TranslationBase.of(context)
.remarks),
onChanged: (value) { onChanged: (value) {
addSickLeave.remarks = value; addSickLeave.remarks = value;
}, },
validator: (value) { )
// return TextValidator().validateName(value);
},
inputFormatter: ONLY_LETTERS)
], ],
), ),
), ),

@ -532,6 +532,22 @@ class TranslationBase {
localizedValues['selectAllergy'][locale.languageCode]; localizedValues['selectAllergy'][locale.languageCode];
String get selectSeverity => String get selectSeverity =>
localizedValues['selectSeverity'][locale.languageCode]; localizedValues['selectSeverity'][locale.languageCode];
String get leaveCreated =>
localizedValues['leaveCreated'][locale.languageCode];
String get vitalSignEmptyMsg =>
localizedValues['vitalSignEmptyMsg'][locale.languageCode];
String get referralEmptyMsg =>
localizedValues['referralEmptyMsg'][locale.languageCode];
String get referralSuccessMsg =>
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 vitalSignEmptyMsg => localizedValues['vitalSignEmptyMsg'][locale.languageCode]; String get vitalSignEmptyMsg => localizedValues['vitalSignEmptyMsg'][locale.languageCode];
String get referralEmptyMsg => localizedValues['referralEmptyMsg'][locale.languageCode]; String get referralEmptyMsg => localizedValues['referralEmptyMsg'][locale.languageCode];
String get referralSuccessMsg => localizedValues['referralSuccessMsg'][locale.languageCode]; String get referralSuccessMsg => localizedValues['referralSuccessMsg'][locale.languageCode];

@ -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:
@ -503,7 +503,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.3" version: "1.3.0-nullsafety.4"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -760,7 +760,7 @@ packages:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.1" version: "1.10.0-nullsafety.2"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
@ -895,5 +895,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.10.0 <2.11.0" dart: ">=2.10.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.0 <2.0.0" flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save