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

replay_status
Elham Rababh 4 years ago
commit a014e0140d

@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]"; const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";

@ -253,7 +253,7 @@ class AuthenticationViewModel extends BaseViewModel {
/// add  token to shared preferences in case of send activation code is success /// add  token to shared preferences in case of send activation code is success
setDataAfterSendActivationSuccess(CheckActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel)async { setDataAfterSendActivationSuccess(CheckActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel)async {
// print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode); // print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode);
await sharedPref.setString(VIDA_AUTH_TOKEN_ID, await sharedPref.setString(VIDA_AUTH_TOKEN_ID,
sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID); sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID);
await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, await sharedPref.setString(VIDA_REFRESH_TOKEN_ID,

@ -1,75 +0,0 @@
import 'package:doctor_app_flutter/core/viewModel/referral_view_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/doctor/my_referral_patient_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import '../../widgets/shared/app_scaffold_widget.dart';
class MyReferralPatient extends StatefulWidget {
int expandedItemIndex = -1;
@override
_MyReferralPatientState createState() => _MyReferralPatientState();
}
class _MyReferralPatientState extends State<MyReferralPatient> {
@override
Widget build(BuildContext context) {
return BaseView<ReferralPatientViewModel>(
onModelReady: (model) => model.getMyReferralPatient(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).myReferralPatient,
body: model.listMyReferralPatientModel.length == 0
? Center(
child: AppText(
TranslationBase.of(context).errorNoSchedule,
color: Theme.of(context).errorColor,
),
)
: Container(
padding: EdgeInsetsDirectional.fromSTEB(20, 0, 20, 0),
child: ListView(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 10,
),
Container(
child: Column(
children: [
...List.generate(
model.listMyReferralPatientModel.length,
(index) => MyReferralPatientWidget(
myReferralPatientModel: model
.listMyReferralPatientModel[index],
model: model,
expandClick: () {
setState(() {
if (widget.expandedItemIndex ==
index) {
widget.expandedItemIndex = -1;
} else {
widget.expandedItemIndex = index;
}
});
},
isExpand:
widget.expandedItemIndex == index,
),
)
],
),
),
],
),
],
),
),
));
}
}

@ -16,7 +16,7 @@ import '../../routes.dart';
class InPatientPage extends StatefulWidget { class InPatientPage extends StatefulWidget {
final bool isMyInPatient; final bool isMyInPatient;
final PatientSearchViewModel patientSearchViewModel; final PatientSearchViewModel patientSearchViewModel;
InPatientPage(this.isMyInPatient, this.patientSearchViewModel); InPatientPage(this.isMyInPatient, this.patientSearchViewModel);
@ -25,7 +25,6 @@ class InPatientPage extends StatefulWidget {
} }
class _InPatientPageState extends State<InPatientPage> { class _InPatientPageState extends State<InPatientPage> {
TextEditingController _searchController = TextEditingController(); TextEditingController _searchController = TextEditingController();
bool isSortDes = false; bool isSortDes = false;
@ -65,10 +64,9 @@ class _InPatientPageState extends State<InPatientPage> {
onChanged: (value) { onChanged: (value) {
widget.patientSearchViewModel.filterSearchResults(value); widget.patientSearchViewModel.filterSearchResults(value);
}), }),
Positioned( Positioned(
right: 35, right: 35,
top:5, top: 5,
child: IconButton( child: IconButton(
icon: Icon( icon: Icon(
isSortDes isSortDes
@ -78,9 +76,10 @@ class _InPatientPageState extends State<InPatientPage> {
), ),
iconSize: 20, iconSize: 20,
// padding: EdgeInsets.only(bottom: 30), // padding: EdgeInsets.only(bottom: 30),
onPressed: () { onPressed: () {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
widget.patientSearchViewModel.sortInPatient(isDes: isSortDes); widget.patientSearchViewModel
.sortInPatient(isDes: isSortDes);
isSortDes = !isSortDes; isSortDes = !isSortDes;
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}, },
@ -89,105 +88,146 @@ class _InPatientPageState extends State<InPatientPage> {
], ],
), ),
), ),
widget.patientSearchViewModel.state == ViewState.Idle?widget.patientSearchViewModel.filteredInPatientItems.length > 0 widget.patientSearchViewModel.state == ViewState.Idle
? (widget.isMyInPatient && widget.patientSearchViewModel.myIinPatientList.length ==0 )?NoData():Expanded( ? widget.patientSearchViewModel.filteredInPatientItems.length > 0
child: Container( ? (widget.isMyInPatient &&
margin: EdgeInsets.symmetric(horizontal: 16.0), widget.patientSearchViewModel.myIinPatientList
child: SingleChildScrollView( .length ==
child: Column( 0)
crossAxisAlignment: CrossAxisAlignment.start, ? NoData()
children: [ : Expanded(
...List.generate( child: Container(
widget.patientSearchViewModel.filteredInPatientItems.length, (index) { margin: EdgeInsets.symmetric(horizontal: 16.0),
if (!widget.isMyInPatient) child: SingleChildScrollView(
return PatientCard( child: Column(
patientInfo: crossAxisAlignment: CrossAxisAlignment.start,
widget.patientSearchViewModel.filteredInPatientItems[index], children: [
patientType: "1", ListView.builder(
arrivalType: "1", itemCount: widget.patientSearchViewModel
isInpatient: true, .filteredInPatientItems.length,
isMyPatient: widget.patientSearchViewModel.filteredInPatientItems[index] scrollDirection: Axis.vertical,
.doctorId == physics: ScrollPhysics(),
widget.patientSearchViewModel.doctorProfile.doctorID, shrinkWrap: true,
onTap: () { itemBuilder: (context, index) {
FocusScopeNode currentFocus = if (!widget.isMyInPatient)
FocusScope.of(context); return PatientCard(
if (!currentFocus.hasPrimaryFocus) { patientInfo: widget
currentFocus.unfocus(); .patientSearchViewModel
} .filteredInPatientItems[index],
patientType: "1",
arrivalType: "1",
isInpatient: true,
isMyPatient: widget
.patientSearchViewModel
.filteredInPatientItems[
index]
.doctorId ==
widget.patientSearchViewModel
.doctorProfile.doctorID,
onTap: () {
FocusScopeNode currentFocus =
FocusScope.of(context);
if (!currentFocus
.hasPrimaryFocus) {
currentFocus.unfocus();
}
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
PATIENTS_PROFILE, PATIENTS_PROFILE,
arguments: { arguments: {
"patient": widget.patientSearchViewModel. "patient": widget
filteredInPatientItems[index], .patientSearchViewModel
"patientType": "1", .filteredInPatientItems[index],
"from": "0", "patientType": "1",
"to": "0", "from": "0",
"isSearch": false, "to": "0",
"isInpatient": true, "isSearch": false,
"arrivalType": "1", "isInpatient": true,
"isMyPatient":widget.patientSearchViewModel.filteredInPatientItems[index] "arrivalType": "1",
.doctorId == "isMyPatient": widget
widget.patientSearchViewModel.doctorProfile.doctorID, .patientSearchViewModel
}); .filteredInPatientItems[
}, index]
); .doctorId ==
else if (widget.patientSearchViewModel.filteredInPatientItems[index] widget
.doctorId == .patientSearchViewModel
widget.patientSearchViewModel.doctorProfile.doctorID && .doctorProfile
widget.isMyInPatient) .doctorID,
return PatientCard( });
patientInfo: },
widget.patientSearchViewModel.filteredInPatientItems[index], );
patientType: "1", else if (widget
arrivalType: "1", .patientSearchViewModel
isInpatient: true, .filteredInPatientItems[
isMyPatient: widget.patientSearchViewModel index]
.filteredInPatientItems[index] .doctorId ==
.doctorId == widget.patientSearchViewModel
widget.patientSearchViewModel.doctorProfile.doctorID, .doctorProfile.doctorID &&
onTap: () { widget.isMyInPatient)
FocusScopeNode currentFocus = return PatientCard(
FocusScope.of(context); patientInfo: widget
if (!currentFocus.hasPrimaryFocus) { .patientSearchViewModel
currentFocus.unfocus(); .filteredInPatientItems[index],
} patientType: "1",
arrivalType: "1",
isInpatient: true,
isMyPatient: widget
.patientSearchViewModel
.filteredInPatientItems[
index]
.doctorId ==
widget.patientSearchViewModel
.doctorProfile.doctorID,
onTap: () {
FocusScopeNode currentFocus =
FocusScope.of(context);
if (!currentFocus
.hasPrimaryFocus) {
currentFocus.unfocus();
}
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
PATIENTS_PROFILE, PATIENTS_PROFILE,
arguments: { arguments: {
"patient": widget.patientSearchViewModel.filteredInPatientItems[index], "patient": widget
"patientType": "1", .patientSearchViewModel
"from": "0", .filteredInPatientItems[index],
"to": "0", "patientType": "1",
"isSearch": false, "from": "0",
"isInpatient": true, "to": "0",
"arrivalType": "1", "isSearch": false,
"isMyPatient":widget.patientSearchViewModel.filteredInPatientItems[index] "isInpatient": true,
.doctorId == "arrivalType": "1",
widget.patientSearchViewModel.doctorProfile.doctorID, "isMyPatient": widget
}); .patientSearchViewModel
}, .filteredInPatientItems[
); index]
else .doctorId ==
return SizedBox(); widget
}), .patientSearchViewModel
SizedBox( .doctorProfile
height: 15, .doctorID,
) });
], },
);
else
return SizedBox();
}),
SizedBox(
height: 15,
)
],
),
),
),
)
: NoData()
: Center(
child: Container(
height: 300,
width: 300,
),
), ),
),
),
)
: NoData(): Center(
child: Container(
height: 300,
width: 300,
),
),
], ],
), ),
); );
@ -202,12 +242,11 @@ class NoData extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Expanded( return Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
child: ErrorMessage( child: ErrorMessage(
error: error: TranslationBase.of(context).noDataAvailable)),
TranslationBase.of(context).noDataAvailable)), ),
), );
);
} }
} }

@ -47,8 +47,7 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(patient),
patient),
appBarTitle: TranslationBase.of(context).ucaf, appBarTitle: TranslationBase.of(context).ucaf,
body: Column( body: Column(
children: [ children: [
@ -234,10 +233,15 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
case 0: case 0:
if (model.patientAssessmentList != null) { if (model.patientAssessmentList != null) {
return [ return [
...List.generate( ListView.builder(
model.patientAssessmentList.length, itemCount: model.patientAssessmentList.length,
(index) => DiagnosisWidget( scrollDirection: Axis.vertical,
model, model.patientAssessmentList[index])).toList() physics: ScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, index) {
return DiagnosisWidget(
model, model.patientAssessmentList[index]);
})
]; ];
} else { } else {
return [ return [
@ -247,22 +251,30 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
break; break;
case 1: case 1:
return [ return [
...List.generate( ListView.builder(
model.prescriptionList != null itemCount: model.prescriptionList != null
? model.prescriptionList.entityList.length ? model.prescriptionList.entityList.length
: 0, : 0,
(index) => MedicationWidget( scrollDirection: Axis.vertical,
model, model.prescriptionList.entityList[index])).toList() physics: ScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, index) {
return MedicationWidget(
model, model.prescriptionList.entityList[index]);
})
]; ];
break; break;
case 2: case 2:
if (model.orderProcedures != null) { if (model.orderProcedures != null) {
return [ return [
...List.generate( ListView.builder(
model.orderProcedures.length, itemCount: model.orderProcedures.length,
(index) => scrollDirection: Axis.vertical,
ProceduresWidget(model, model.orderProcedures[index])) physics: ScrollPhysics(),
.toList() shrinkWrap: true,
itemBuilder: (context, index) {
return ProceduresWidget(model, model.orderProcedures[index]);
})
]; ];
} else { } else {
return [ return [

@ -18,7 +18,8 @@ import 'my-referral-patient-screen.dart';
class MyReferralInPatientScreen extends StatefulWidget { class MyReferralInPatientScreen extends StatefulWidget {
@override @override
_MyReferralInPatientScreenState createState() => _MyReferralInPatientScreenState(); _MyReferralInPatientScreenState createState() =>
_MyReferralInPatientScreenState();
} }
class _MyReferralInPatientScreenState extends State<MyReferralInPatientScreen> { class _MyReferralInPatientScreenState extends State<MyReferralInPatientScreen> {
@ -76,51 +77,87 @@ class _MyReferralInPatientScreenState extends State<MyReferralInPatientScreen> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
...List.generate( ListView.builder(
model.myReferralPatients.length, itemCount: model.myReferralPatients.length,
(index) => InkWell( scrollDirection: Axis.vertical,
onTap: () { physics: ScrollPhysics(),
if(patientType == PatientType.OUT_PATIENT) { shrinkWrap: true,
Navigator.push( itemBuilder: (context, index) {
context, return InkWell(
FadePage( onTap: () {
page: MyReferralDetailScreen(referralPatient: model.myReferralPatients[index]), if (patientType ==
), PatientType.OUT_PATIENT) {
); Navigator.push(
} else{ context,
Navigator.push( FadePage(
context, page: MyReferralDetailScreen(
FadePage( referralPatient: model
page: ReferralPatientDetailScreen(model.myReferralPatients[index], model), .myReferralPatients[index]),
), ),
); );
} } else {
Navigator.push(
}, context,
child: PatientReferralItemWidget( FadePage(
referralStatus: model.getReferralStatusNameByCode( page: ReferralPatientDetailScreen(
model.myReferralPatients[index].referralStatus, context), model.myReferralPatients[index],
referralStatusCode: model.myReferralPatients[index].referralStatus, model),
patientName: model.myReferralPatients[index].patientName, ),
patientGender: model.myReferralPatients[index].gender, );
referredDate: AppDateUtils.getDayMonthYearDateFormatted( }
model.myReferralPatients[index].referralDate), },
referredTime: AppDateUtils.getTimeHHMMA(model.myReferralPatients[index].referralDate), child: PatientReferralItemWidget(
patientID: "${model.myReferralPatients[index].patientID}", referralStatus:
isSameBranch: false, model.getReferralStatusNameByCode(
isReferral: true, model.myReferralPatients[index]
isReferralClinic: true, .referralStatus,
referralClinic: "${model.myReferralPatients[index].referringClinicDescription}", context),
remark: model.myReferralPatients[index].referringDoctorRemarks, referralStatusCode: model
nationality: model.myReferralPatients[index].nationalityName, .myReferralPatients[index]
nationalityFlag: model.myReferralPatients[index].nationalityFlagURL, .referralStatus,
doctorAvatar: model.myReferralPatients[index].doctorImageURL, patientName: model
referralDoctorName: model.myReferralPatients[index].referringDoctorName, .myReferralPatients[index]
clinicDescription: model.myReferralPatients[index].referringClinicDescription, .patientName,
infoIcon: Icon(FontAwesomeIcons.arrowRight, size: 25, color: Colors.black), patientGender: model
), .myReferralPatients[index].gender,
), referredDate: AppDateUtils
), .getDayMonthYearDateFormatted(model
.myReferralPatients[index]
.referralDate),
referredTime: AppDateUtils.getTimeHHMMA(
model.myReferralPatients[index]
.referralDate),
patientID:
"${model.myReferralPatients[index].patientID}",
isSameBranch: false,
isReferral: true,
isReferralClinic: true,
referralClinic:
"${model.myReferralPatients[index].referringClinicDescription}",
remark: model.myReferralPatients[index]
.referringDoctorRemarks,
nationality: model
.myReferralPatients[index]
.nationalityName,
nationalityFlag: model
.myReferralPatients[index]
.nationalityFlagURL,
doctorAvatar: model
.myReferralPatients[index]
.doctorImageURL,
referralDoctorName: model
.myReferralPatients[index]
.referringDoctorName,
clinicDescription: model
.myReferralPatients[index]
.referringClinicDescription,
infoIcon: Icon(
FontAwesomeIcons.arrowRight,
size: 25,
color: Colors.black),
),
);
})
], ],
), ),
), ),

@ -13,7 +13,6 @@ import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class ReferredPatientScreen extends StatefulWidget { class ReferredPatientScreen extends StatefulWidget {
@override @override
_ReferredPatientScreenState createState() => _ReferredPatientScreenState(); _ReferredPatientScreenState createState() => _ReferredPatientScreenState();
} }
@ -69,79 +68,87 @@ class _ReferredPatientScreenState extends State<ReferredPatientScreen> {
), ),
) )
: Expanded( : Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
// DoctorApplication.svc/REST/GtMyReferredPatient // DoctorApplication.svc/REST/GtMyReferredPatient
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
...List.generate( ListView.builder(
model.listMyReferredPatientModel.length, itemCount:
(index) => InkWell( model.listMyReferredPatientModel.length,
onTap: () { scrollDirection: Axis.vertical,
Navigator.push( physics: ScrollPhysics(),
context, shrinkWrap: true,
FadePage( itemBuilder: (context, index) {
page: ReferredPatientDetailScreen( return InkWell(
model.getReferredPatientItem(index), this.patientType), onTap: () {
), Navigator.push(
); context,
}, FadePage(
child: PatientReferralItemWidget( page: ReferredPatientDetailScreen(
referralStatus: model model.getReferredPatientItem(index),
.getReferredPatientItem(index) this.patientType),
.referralStatusDesc, ),
referralStatusCode: model );
.getReferredPatientItem(index) },
.referralStatus, child: PatientReferralItemWidget(
patientName: referralStatus: model
"${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}", .getReferredPatientItem(index)
patientGender: .referralStatusDesc,
model.getReferredPatientItem(index).gender, referralStatusCode: model
referredDate: .getReferredPatientItem(index)
AppDateUtils.convertDateFromServerFormat( .referralStatus,
model patientName:
.getReferredPatientItem(index) "${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}",
.referralDate, patientGender: model
"dd/MM/yyyy"), .getReferredPatientItem(index)
referredTime: .gender,
AppDateUtils.convertDateFromServerFormat( referredDate: AppDateUtils
model .convertDateFromServerFormat(
.getReferredPatientItem(index) model
.referralDate, .getReferredPatientItem(index)
"hh:mm a"), .referralDate,
patientID: "dd/MM/yyyy"),
"${model.getReferredPatientItem(index).patientID}", referredTime: AppDateUtils
isSameBranch: model .convertDateFromServerFormat(
.getReferredPatientItem(index) model
.isReferralDoctorSameBranch, .getReferredPatientItem(index)
isReferral: false, .referralDate,
remark: model "hh:mm a"),
.getReferredPatientItem(index) patientID:
.referringDoctorRemarks, "${model.getReferredPatientItem(index).patientID}",
nationality: model isSameBranch: model
.getReferredPatientItem(index) .getReferredPatientItem(index)
.nationalityName, .isReferralDoctorSameBranch,
nationalityFlag: model isReferral: false,
.getReferredPatientItem(index) remark: model
.nationalityFlagURL, .getReferredPatientItem(index)
doctorAvatar: model .referringDoctorRemarks,
.getReferredPatientItem(index) nationality: model
.doctorImageURL, .getReferredPatientItem(index)
referralDoctorName: .nationalityName,
"${TranslationBase.of(context).dr} ${model.getReferredPatientItem(index).referralDoctorName}", nationalityFlag: model
clinicDescription: model .getReferredPatientItem(index)
.getReferredPatientItem(index) .nationalityFlagURL,
.referralClinicDescription, doctorAvatar: model
infoIcon: Icon(FontAwesomeIcons.arrowRight, .getReferredPatientItem(index)
size: 25, color: Colors.black), .doctorImageURL,
), referralDoctorName:
), "${TranslationBase.of(context).dr} ${model.getReferredPatientItem(index).referralDoctorName}",
clinicDescription: model
.getReferredPatientItem(index)
.referralClinicDescription,
infoIcon: Icon(FontAwesomeIcons.arrowRight,
size: 25, color: Colors.black),
),
);
},
), ),
], ],
), ),
), ),
), ),
), ),
], ],
), ),
), ),

@ -348,58 +348,62 @@ class PatientCard extends StatelessWidget {
width: 10, width: 10,
), ),
Expanded( Expanded(
child: Column( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Expanded(
CustomRow( child: Column(
label: TranslationBase.of(context).fileNumber, crossAxisAlignment: CrossAxisAlignment.start,
value: patientInfo.patientId.toString(), children: [
),
//if (isInpatient)
CustomRow(
label: TranslationBase.of(context).age + " : ",
value:
"${AppDateUtils.getAgeByBirthday(patientInfo.dateofBirth, context, isServerFormat: !isFromLiveCare)}",
),
if (isInpatient)
CustomRow(
label: patientInfo.admissionDate == null
? ""
: TranslationBase.of(context)
.admissionDate +
" : ",
value: patientInfo.admissionDate == null
? ""
: "${AppDateUtils.convertDateFromServerFormat(patientInfo.admissionDate.toString(), 'yyyy-MM-dd')}",
),
if (patientInfo.admissionDate != null)
CustomRow(
label: TranslationBase.of(context).numOfDays +
" : ",
value:
"${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patientInfo.admissionDate)).inDays + 1}",
),
if (patientInfo.admissionDate != null)
CustomRow(
label:
TranslationBase.of(context).roomNo + " : ",
value: "${patientInfo.roomId}",
),
if (isFromLiveCare)
Column(
children: [
CustomRow( CustomRow(
label: TranslationBase.of(context).clinic + label: TranslationBase.of(context).fileNumber,
" : ", value: patientInfo.patientId.toString(),
value: patientInfo.clinicName,
), ),
], CustomRow(
label: TranslationBase.of(context).age + " : ",
value:
"${AppDateUtils.getAgeByBirthday(patientInfo.dateofBirth, context, isServerFormat: !isFromLiveCare)}",
),
if (isInpatient)
CustomRow(
label: patientInfo.admissionDate == null
? ""
: TranslationBase.of(context)
.admissionDate +
" : ",
value: patientInfo.admissionDate == null
? ""
: "${AppDateUtils.convertDateFromServerFormat(patientInfo.admissionDate.toString(), 'yyyy-MM-dd')}",
),
if (patientInfo.admissionDate != null)
CustomRow(
label: TranslationBase.of(context).numOfDays +
" : ",
value:
"${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patientInfo.admissionDate)).inDays + 1}",
),
if (patientInfo.admissionDate != null)
CustomRow(
label:
TranslationBase.of(context).roomNo + " : ",
value: "${patientInfo.roomId}",
),
if (isFromLiveCare)
Column(
children: [
CustomRow(
label: TranslationBase.of(context).clinic +
" : ",
value: patientInfo.clinicName,
),
],
),
]),
), ),
])) Icon(Icons.arrow_forward, size: 24,),
],
))
]), ]),
isFromLiveCare isFromLiveCare
? Row( ? Row(

Loading…
Cancel
Save