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
qassim-MOH-demo-
Sultan Khan 2 months ago
commit 58f3f62120

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

@ -193,74 +193,76 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
SizedBox( SizedBox(
width: 20, width: 20,
), ),
Column( Expanded(
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
// SizedBox(height: 10,), children: [
Row( // SizedBox(height: 10,),
mainAxisAlignment: MainAxisAlignment.spaceBetween, // Row(
crossAxisAlignment: CrossAxisAlignment.start, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // crossAxisAlignment: CrossAxisAlignment.start,
Column( // children: [
crossAxisAlignment: CrossAxisAlignment.start, // Column(
children: [ // crossAxisAlignment: CrossAxisAlignment.start,
CustomRow( // children: [
label: TranslationBase.of(context).fileNumber, CustomRow(
value: widget.reply.patientID.toString(), label: TranslationBase.of(context).fileNumber,
isCopyable: false, value: widget.reply.patientID.toString(),
isExpanded: false, isCopyable: false,
), isExpanded: false,
CustomRow( ),
label: TranslationBase.of(context).age + " : ", isCopyable: false, CustomRow(
isExpanded: false, label: TranslationBase.of(context).age + " : ", isCopyable: false,
value: isExpanded: false,
"${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth!, context)}", value:
), "${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth!, context)}",
SizedBox( ),
height: 8, SizedBox(
), height: 8,
], ),
), // ],
], // ),
), // ],
// ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.5, width: MediaQuery.of(context).size.width * 0.5,
child: RichText( child: RichText(
maxLines: 3, maxLines: 3,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
fontSize: 1.3 * SizeConfig.textMultiplier!, fontSize: 1.3 * SizeConfig.textMultiplier!,
color: Color(0xFF575757)), color: Color(0xFF575757)),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: text:
TranslationBase.of(context).requestType + TranslationBase.of(context).requestType +
": ", ": ",
style: TextStyle( style: TextStyle(
fontSize: SizeConfig fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() * .getTextMultiplierBasedOnWidth() *
2.8, 2.8,
color: Color(0xFF575757), color: Color(0xFF575757),
//TranslationBase.of(context).doctorResponse + " : ", //TranslationBase.of(context).doctorResponse + " : ",
)), )),
new TextSpan( new TextSpan(
text: text:
"${widget.reply.requestTypeDescription}", "${widget.reply.requestTypeDescription}",
style: TextStyle( style: TextStyle(
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() * .getTextMultiplierBasedOnWidth() *
3, 3,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.w700, 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/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/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/doctor_card.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:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -63,149 +64,152 @@ class _LabsHomePageState extends State<LabsHomePage> {
// isInpatient: isInpatient!, // isInpatient: isInpatient!,
// ), // ),
// body: // body:
Material( Material(
child: Column( child: Column(
children: [ children: [
PatientProfileAppBar( PatientProfileAppBar(
patient!, patient!,
isInpatient: isInpatient!, isInpatient: isInpatient!,
), ),
Expanded( Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: FractionallySizedBox( child: FractionallySizedBox(
widthFactor: 1.0, widthFactor: 1.0,
child: Column( child: NetworkBaseView(
crossAxisAlignment: CrossAxisAlignment.start, baseViewModel: model,
children: <Widget>[ child:Column(
SizedBox( crossAxisAlignment: CrossAxisAlignment.start,
height: 12, children: <Widget>[
), SizedBox(
if ((model.patientLabOrdersList.isNotEmpty && patient!.patientStatusType != 43) || (patient!.patientStatusType != null && patient!.patientStatusType == 43)) height: 12,
ServiceTitle(
title: TranslationBase.of(context).lab,
subTitle: TranslationBase.of(context).result,
), ),
SizedBox( if ((model.patientLabOrdersList.isNotEmpty && patient!.patientStatusType != 43) || (patient!.patientStatusType != null && patient!.patientStatusType == 43))
height: 20, ServiceTitle(
), title: TranslationBase.of(context).lab,
!model.isPrincipalCovered_ subTitle: TranslationBase.of(context).result,
? Center( ),
child: AppText( SizedBox(
TranslationBase.of(context).principalCoveredOrNot, height: 20,
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,
), ),
...List.generate( !model.isPrincipalCovered_
model.patientLabOrdersList.length, ? Center(
(index) => Container( child: AppText(
margin: EdgeInsets.all(10), TranslationBase.of(context).principalCoveredOrNot,
decoration: BoxDecoration( color: Colors.red,
border: Border.all( textAlign: TextAlign.center,
width: 0.5, ))
color: Colors.white, : SizedBox(),
), if ((patient!.patientStatusType != null && patient!.patientStatusType == 43) || (isFromLiveCare! && patient!.appointmentNo != null))
borderRadius: BorderRadius.all( AddNewOrder(
Radius.circular(8.0), onTap: () {
), Navigator.push(
color: Colors.white), context,
child: Stack( MaterialPageRoute(
children: [ builder: (context) => BaseAddProcedureTabPage(
Positioned( patient: patient!,
bottom: 1, previousProcedureViewModel: model,
top: 1, procedureType: ProcedureType.LAB_RESULT,
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( settings: RouteSettings(name: 'AddProcedureTabPage'),
quarterTurns: 3, ),
child: Center( );
child: Text( },
model.patientLabOrdersList[index].isLiveCareAppointment! label: TranslationBase.of(context).applyForNewLabOrder,
? TranslationBase.of(context).liveCare.toUpperCase() ),
: !model.patientLabOrdersList[index].isInOutPatient! ...List.generate(
? TranslationBase.of(context).inPatientLabel.toUpperCase() model.patientLabOrdersList.length,
: TranslationBase.of(context).outpatient.toUpperCase(), (index) => Container(
style: TextStyle(color: Colors.white), 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),
Container( child: Stack(
color: Colors.white, children: [
padding: EdgeInsets.all(0), Positioned(
margin: EdgeInsets.only(left: 20), bottom: 1,
child: DoctorCard( top: 1,
isNoMargin: true, left: 1,
onTap: () => Navigator.push( child: Container(
context, width: 20,
FadePage( decoration: BoxDecoration(
page: LaboratoryResultPage( color: model.patientLabOrdersList![index].isLiveCareAppointment!
patientLabOrders: model.patientLabOrdersList[index], ? Colors.red[900]
patient: patient!, : !model.patientLabOrdersList[index].isInOutPatient!
isInpatient: isInpatient!, ? Colors.black
arrivalType: arrivalType!, : Color(0xffa9a089),
patientType: patientType!, 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)
if (model.patientLabOrdersList.isEmpty && patient!.patientStatusType != 43) Center(
Center( child: ErrorMessage(
child: ErrorMessage( error: TranslationBase.of(context).noDataAvailable,
error: TranslationBase.of(context).noDataAvailable, ))
)) ],
], ),)
), ),
), ),
), ),
), ],
], ),
), ),
), );
);
} }
} }

@ -148,7 +148,11 @@ class ReferredPatientDetailScreen extends StatelessWidget {
: Colors.red[700]!, : Colors.red[700]!,
), ),
AppText( 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', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 2.0 * SizeConfig.textMultiplier!, fontSize: 2.0 * SizeConfig.textMultiplier!,
@ -179,7 +183,11 @@ class ReferredPatientDetailScreen extends StatelessWidget {
], ],
), ),
AppText( 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', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 1.8 * SizeConfig.textMultiplier!, fontSize: 1.8 * SizeConfig.textMultiplier!,

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

Loading…
Cancel
Save