Merge branch 'ipd-changes-for-vida-plus' of http://34.17.182.140/Haroon6138/doctor_app_flutter into ipd-changes-for-vida-plus

* 'ipd-changes-for-vida-plus' of http://34.17.182.140/Haroon6138/doctor_app_flutter:
  loader and search field issue resolved.
  referral time display issue for out patient
ipd-changes-for-vida-plus
Sultan Khan 6 days ago
commit 58f3f62120

@ -103,13 +103,14 @@ class PatientReferralViewModel extends BaseViewModel {
error = _referralPatientService.error;
setState(ViewState.Error);
}
// await getBranches();
await getBranches();
}
Future getBranches() async {
setState(ViewState.BusyLocal);
if( _hospitalService.hospitals.isNotEmpty){
mapHospitalToBranchList();
setState(ViewState.Idle);
return;
}

@ -193,74 +193,76 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
SizedBox(
width: 20,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// SizedBox(height: 10,),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CustomRow(
label: TranslationBase.of(context).fileNumber,
value: widget.reply.patientID.toString(),
isCopyable: false,
isExpanded: false,
),
CustomRow(
label: TranslationBase.of(context).age + " : ", isCopyable: false,
isExpanded: false,
value:
"${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth!, context)}",
),
SizedBox(
height: 8,
),
],
),
],
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// SizedBox(height: 10,),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
CustomRow(
label: TranslationBase.of(context).fileNumber,
value: widget.reply.patientID.toString(),
isCopyable: false,
isExpanded: false,
),
CustomRow(
label: TranslationBase.of(context).age + " : ", isCopyable: false,
isExpanded: false,
value:
"${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth!, context)}",
),
SizedBox(
height: 8,
),
// ],
// ),
// ],
// ),
Container(
width: MediaQuery.of(context).size.width * 0.5,
child: RichText(
maxLines: 3,
overflow: TextOverflow.ellipsis,
text: new TextSpan(
style: new TextStyle(
fontSize: 1.3 * SizeConfig.textMultiplier!,
color: Color(0xFF575757)),
children: <TextSpan>[
new TextSpan(
text:
TranslationBase.of(context).requestType +
": ",
style: TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
2.8,
color: Color(0xFF575757),
//TranslationBase.of(context).doctorResponse + " : ",
)),
new TextSpan(
text:
"${widget.reply.requestTypeDescription}",
style: TextStyle(
fontFamily: 'Poppins',
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
)),
],
Container(
width: MediaQuery.of(context).size.width * 0.5,
child: RichText(
maxLines: 3,
overflow: TextOverflow.ellipsis,
text: new TextSpan(
style: new TextStyle(
fontSize: 1.3 * SizeConfig.textMultiplier!,
color: Color(0xFF575757)),
children: <TextSpan>[
new TextSpan(
text:
TranslationBase.of(context).requestType +
": ",
style: TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
2.8,
color: Color(0xFF575757),
//TranslationBase.of(context).doctorResponse + " : ",
)),
new TextSpan(
text:
"${widget.reply.requestTypeDescription}",
style: TextStyle(
fontFamily: 'Poppins',
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
)),
],
),
),
),
),
],
],
),
)
],
),

@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrde
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -63,149 +64,152 @@ class _LabsHomePageState extends State<LabsHomePage> {
// isInpatient: isInpatient!,
// ),
// body:
Material(
child: Column(
children: [
PatientProfileAppBar(
patient!,
isInpatient: isInpatient!,
),
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: FractionallySizedBox(
widthFactor: 1.0,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 12,
),
if ((model.patientLabOrdersList.isNotEmpty && patient!.patientStatusType != 43) || (patient!.patientStatusType != null && patient!.patientStatusType == 43))
ServiceTitle(
title: TranslationBase.of(context).lab,
subTitle: TranslationBase.of(context).result,
Material(
child: Column(
children: [
PatientProfileAppBar(
patient!,
isInpatient: isInpatient!,
),
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: FractionallySizedBox(
widthFactor: 1.0,
child: NetworkBaseView(
baseViewModel: model,
child:Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 12,
),
SizedBox(
height: 20,
),
!model.isPrincipalCovered_
? Center(
child: AppText(
TranslationBase.of(context).principalCoveredOrNot,
color: Colors.red,
textAlign: TextAlign.center,
))
: SizedBox(),
if ((patient!.patientStatusType != null && patient!.patientStatusType == 43) || (isFromLiveCare! && patient!.appointmentNo != null))
AddNewOrder(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => BaseAddProcedureTabPage(
patient: patient!,
previousProcedureViewModel: model,
procedureType: ProcedureType.LAB_RESULT,
),
settings: RouteSettings(name: 'AddProcedureTabPage'),
),
);
},
label: TranslationBase.of(context).applyForNewLabOrder,
if ((model.patientLabOrdersList.isNotEmpty && patient!.patientStatusType != 43) || (patient!.patientStatusType != null && patient!.patientStatusType == 43))
ServiceTitle(
title: TranslationBase.of(context).lab,
subTitle: TranslationBase.of(context).result,
),
SizedBox(
height: 20,
),
...List.generate(
model.patientLabOrdersList.length,
(index) => Container(
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border.all(
width: 0.5,
color: Colors.white,
),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
color: Colors.white),
child: Stack(
children: [
Positioned(
bottom: 1,
top: 1,
left: 1,
child: Container(
width: 20,
decoration: BoxDecoration(
color: model.patientLabOrdersList![index].isLiveCareAppointment!
? Colors.red[900]
: !model.patientLabOrdersList[index].isInOutPatient!
? Colors.black
: Color(0xffa9a089),
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0)),
!model.isPrincipalCovered_
? Center(
child: AppText(
TranslationBase.of(context).principalCoveredOrNot,
color: Colors.red,
textAlign: TextAlign.center,
))
: SizedBox(),
if ((patient!.patientStatusType != null && patient!.patientStatusType == 43) || (isFromLiveCare! && patient!.appointmentNo != null))
AddNewOrder(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => BaseAddProcedureTabPage(
patient: patient!,
previousProcedureViewModel: model,
procedureType: ProcedureType.LAB_RESULT,
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
model.patientLabOrdersList[index].isLiveCareAppointment!
? TranslationBase.of(context).liveCare.toUpperCase()
: !model.patientLabOrdersList[index].isInOutPatient!
? TranslationBase.of(context).inPatientLabel.toUpperCase()
: TranslationBase.of(context).outpatient.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
settings: RouteSettings(name: 'AddProcedureTabPage'),
),
);
},
label: TranslationBase.of(context).applyForNewLabOrder,
),
...List.generate(
model.patientLabOrdersList.length,
(index) => Container(
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border.all(
width: 0.5,
color: Colors.white,
),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
),
Container(
color: Colors.white,
padding: EdgeInsets.all(0),
margin: EdgeInsets.only(left: 20),
child: DoctorCard(
isNoMargin: true,
onTap: () => Navigator.push(
context,
FadePage(
page: LaboratoryResultPage(
patientLabOrders: model.patientLabOrdersList[index],
patient: patient!,
isInpatient: isInpatient!,
arrivalType: arrivalType!,
patientType: patientType!,
color: Colors.white),
child: Stack(
children: [
Positioned(
bottom: 1,
top: 1,
left: 1,
child: Container(
width: 20,
decoration: BoxDecoration(
color: model.patientLabOrdersList![index].isLiveCareAppointment!
? Colors.red[900]
: !model.patientLabOrdersList[index].isInOutPatient!
? Colors.black
: Color(0xffa9a089),
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0)),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
model.patientLabOrdersList[index].isLiveCareAppointment!
? TranslationBase.of(context).liveCare.toUpperCase()
: !model.patientLabOrdersList[index].isInOutPatient!
? TranslationBase.of(context).inPatientLabel.toUpperCase()
: TranslationBase.of(context).outpatient.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
),
),
Container(
color: Colors.white,
padding: EdgeInsets.all(0),
margin: EdgeInsets.only(left: 20),
child: DoctorCard(
isNoMargin: true,
onTap: () => Navigator.push(
context,
FadePage(
page: LaboratoryResultPage(
patientLabOrders: model.patientLabOrdersList[index],
patient: patient!,
isInpatient: isInpatient!,
arrivalType: arrivalType!,
patientType: patientType!,
),
),
),
doctorName: Utils.convertToTitleCase(model.patientLabOrdersList[index].doctorName),
invoiceNO: ' ${model.patientLabOrdersList[index].invoiceNo}',
profileUrl: model.patientLabOrdersList[index].doctorImageURL,
branch: model.patientLabOrdersList[index].projectName,
clinic: Utils.convertToTitleCase(model.patientLabOrdersList[index].clinicDescription),
appointmentDate: model.patientLabOrdersList[index].createdOn,
orderNo: model.patientLabOrdersList[index].orderNo,
isShowTime: false,
),
doctorName: Utils.convertToTitleCase(model.patientLabOrdersList[index].doctorName),
invoiceNO: ' ${model.patientLabOrdersList[index].invoiceNo}',
profileUrl: model.patientLabOrdersList[index].doctorImageURL,
branch: model.patientLabOrdersList[index].projectName,
clinic: Utils.convertToTitleCase(model.patientLabOrdersList[index].clinicDescription),
appointmentDate: model.patientLabOrdersList[index].createdOn,
orderNo: model.patientLabOrdersList[index].orderNo,
isShowTime: false,
),
),
],
],
),
),
),
),
if (model.patientLabOrdersList.isEmpty && patient!.patientStatusType != 43)
Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
))
],
if (model.patientLabOrdersList.isEmpty && patient!.patientStatusType != 43)
Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
))
],
),)
),
),
),
),
],
),
),
);
),
],
),
),
);
}
}

@ -148,7 +148,11 @@ class ReferredPatientDetailScreen extends StatelessWidget {
: Colors.red[700]!,
),
AppText(
AppDateUtils.convertDateFromServerFormat(referredPatient.referralDate!, "dd MMM,yyyy"),
patientType == PatientType.IN_PATIENT
? AppDateUtils.convertDateFromServerFormat(referredPatient.referralDate!, "dd MMM,yyyy")
:AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromString(
referredPatient.referralDate!,
)),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 2.0 * SizeConfig.textMultiplier!,
@ -179,7 +183,11 @@ class ReferredPatientDetailScreen extends StatelessWidget {
],
),
AppText(
AppDateUtils.convertDateFromServerFormat(referredPatient.referralDate!, "hh:mm a"),
patientType == PatientType.IN_PATIENT
? AppDateUtils.convertDateFromServerFormat(referredPatient.referralDate!, "hh:mm a")
:AppDateUtils.getTimeFormated(AppDateUtils.getDateTimeFromString(
referredPatient.referralDate!),
),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.8 * SizeConfig.textMultiplier!,

@ -147,7 +147,7 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
EntityListCheckboxSearchWidget(
model: widget.model,
masterList: model.categoriesList[0].entityList!,
shouldDisplaySearchField: false,
shouldDisplaySearchField: procedureType != ProcedureType.PROCEDURE ,
removeProcedure: (item) {
EntityList? itemToBeRemoved = entityList.firstWhere((element) => item.procedureId == element.procedureId, orElse: () => EntityList());
if (itemToBeRemoved.procedureId != null) {

Loading…
Cancel
Save