flutter 2 migration fix

merge-requests/752/merge
hussam al-habibeh 5 years ago
parent eb2b614f74
commit 550d54c034

@ -44,10 +44,10 @@ class BaseAppClient {
if (body['DoctorID'] == "") body['DoctorID'] = null; if (body['DoctorID'] == "") body['DoctorID'] = null;
if (body['EditedBy'] == null) body['EditedBy'] = doctorProfile.doctorID; if (body['EditedBy'] == null) body['EditedBy'] = doctorProfile.doctorID;
if (body['ProjectID'] == null) { if (body['ProjectID'] == null) {
body['ProjectID'] = doctorProfile?.projectID; body['ProjectID'] = doctorProfile.projectID;
} }
if (body['ClinicID'] == null) body['ClinicID'] = doctorProfile?.clinicID; if (body['ClinicID'] == null) body['ClinicID'] = doctorProfile.clinicID;
if (body['DoctorID'] == '') { if (body['DoctorID'] == '') {
body['DoctorID'] = null; body['DoctorID'] = null;
} }
@ -56,7 +56,7 @@ class BaseAppClient {
} }
} }
if (body['TokenID'] == null) { if (body['TokenID'] == null) {
body['TokenID'] = token ?? ''; body['TokenID'] = token;
} }
// body['TokenID'] = "@dm!n" ?? ''; // body['TokenID'] = "@dm!n" ?? '';
String lang = await sharedPref.getString(APP_Language); String lang = await sharedPref.getString(APP_Language);

@ -40,13 +40,13 @@ class SizeConfig {
isHeightLarge = true; isHeightLarge = true;
} }
if(constraints.maxWidth > 600) { if (constraints.maxWidth > 600) {
isWidthLarge = true; isWidthLarge = true;
} }
if (orientation == Orientation.portrait) { if (orientation == Orientation.portrait) {
isPortrait = true; isPortrait = true;
if (realScreenWidth! < 450) { if (realScreenWidth < 450) {
isMobilePortrait = true; isMobilePortrait = true;
} }
screenHeight = realScreenHeight; screenHeight = realScreenHeight;
@ -57,8 +57,8 @@ class SizeConfig {
screenHeight = realScreenWidth; screenHeight = realScreenWidth;
screenWidth = realScreenHeight; screenWidth = realScreenHeight;
} }
_blockWidth = (screenWidth! / 100); _blockWidth = (screenWidth / 100);
_blockHeight = (screenHeight! / 100)!; _blockHeight = (screenHeight / 100);
textMultiplier = _blockHeight; textMultiplier = _blockHeight;
imageSizeMultiplier = _blockWidth; imageSizeMultiplier = _blockWidth;
@ -75,26 +75,25 @@ class SizeConfig {
print('isMobilePortrait $isMobilePortrait'); print('isMobilePortrait $isMobilePortrait');
} }
static getTextMultiplierBasedOnWidth({double? width}){ static getTextMultiplierBasedOnWidth({double? width}) {
// TODO handel LandScape case // TODO handel LandScape case
if(width != null) { if (width != null) {
return width / 100; return width / 100;
} }
return widthMultiplier; return widthMultiplier;
} }
static getWidthMultiplier({double? width}) {
static getWidthMultiplier({double? width}){
// TODO handel LandScape case // TODO handel LandScape case
if(width != null) { if (width != null) {
return width / 100; return width / 100;
} }
return widthMultiplier; return widthMultiplier;
} }
static getHeightMultiplier({double? height}){ static getHeightMultiplier({double? height}) {
// TODO handel LandScape case // TODO handel LandScape case
if(height != null) { if (height != null) {
return height / 100; return height / 100;
} }
return heightMultiplier; return heightMultiplier;

@ -428,7 +428,7 @@ class PatientService extends BaseService {
referralClinic: selectedClinicID.toString(), referralClinic: selectedClinicID.toString(),
referralDoctor: selectedDoctorID.toString(), referralDoctor: selectedDoctorID.toString(),
createdBy: doctorID!, createdBy: doctorID!,
editedBy: doctorID!, editedBy: doctorID,
patientID: patientID!, patientID: patientID!,
patientTypeID: patientTypeID!, patientTypeID: patientTypeID!,
referringClinic: clinicId!, referringClinic: clinicId!,

@ -203,7 +203,7 @@ class PrescriptionService extends LookupService {
"Gender": patient.gender == 1 ? 'Male' : 'Female', "Gender": patient.gender == 1 ? 'Male' : 'Female',
"Age": AppDateUtils.convertDateFromServerFormat(patient.dateofBirth!, 'dd/MM/yyyy') "Age": AppDateUtils.convertDateFromServerFormat(patient.dateofBirth!, 'dd/MM/yyyy')
}, },
"objVitalSign": {"Height": vital?.heightCm, "Weight": vital?.weightKg}, "objVitalSign": {"Height": vital.heightCm, "Weight": vital.weightKg},
"objPrescriptionItems": prescription, "objPrescriptionItems": prescription,
"objAllergies": getAllergiesObj(allergy), "objAllergies": getAllergiesObj(allergy),
"objDiagnosis": getDiagnosisObj(lstAssessments), "objDiagnosis": getDiagnosisObj(lstAssessments),

@ -124,7 +124,7 @@ class PrescriptionsService extends BaseService {
bool isInPatient = false; bool isInPatient = false;
prescriptionsList.forEach((element) { prescriptionsList.forEach((element) {
if (prescriptionsOrder!.appointmentNo == "0") { if (prescriptionsOrder!.appointmentNo == "0") {
if (element.dischargeNo == int.parse(prescriptionsOrder!.dischargeID)) { if (element.dischargeNo == int.parse(prescriptionsOrder.dischargeID)) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo; _requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID; _requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID; _requestPrescriptionReportEnh.projectID = element.projectID;

@ -184,7 +184,7 @@ class AuthenticationViewModel extends BaseViewModel {
mobileNumber: loggedUser != null ? loggedUser!.mobileNumber : user!.mobile, mobileNumber: loggedUser != null ? loggedUser!.mobileNumber : user!.mobile,
projectID: await sharedPref.getInt(PROJECT_ID) != null ? await sharedPref.getInt(PROJECT_ID) : user!.projectID, projectID: await sharedPref.getInt(PROJECT_ID) != null ? await sharedPref.getInt(PROJECT_ID) : user!.projectID,
logInTokenID: await sharedPref.getString(LOGIN_TOKEN_ID), logInTokenID: await sharedPref.getString(LOGIN_TOKEN_ID),
activationCode: activationCode ?? '0000', activationCode: activationCode,
oTPSendType: await sharedPref.getInt(OTP_TYPE), oTPSendType: await sharedPref.getInt(OTP_TYPE),
generalid: "Cs2020@2016\$2958"); generalid: "Cs2020@2016\$2958");
await _authService.checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp); await _authService.checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp);
@ -232,7 +232,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( setDataAfterSendActivationSuccess(
SendActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel) { SendActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel) {
print("VerificationCode : " +sendActivationCodeForDoctorAppResponseModel!.verificationCode!); print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode!);
// DrAppToastMsg.showSuccesToast("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode!); // DrAppToastMsg.showSuccesToast("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode!);
sharedPref.setString(VIDA_AUTH_TOKEN_ID, sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID!); sharedPref.setString(VIDA_AUTH_TOKEN_ID, sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID!);
sharedPref.setString(VIDA_REFRESH_TOKEN_ID, sendActivationCodeForDoctorAppResponseModel.vidaRefreshTokenID!); sharedPref.setString(VIDA_REFRESH_TOKEN_ID, sendActivationCodeForDoctorAppResponseModel.vidaRefreshTokenID!);
@ -274,7 +274,8 @@ class AuthenticationViewModel extends BaseViewModel {
clinicID: clinicInfo.clinicID, clinicID: clinicInfo.clinicID,
license: true, license: true,
projectID: clinicInfo.projectID, projectID: clinicInfo.projectID,
tokenID: '',); //TODO change the lan tokenID: '',
); //TODO change the lan
await _authService.getDoctorProfileBasedOnClinic(docInfo); await _authService.getDoctorProfileBasedOnClinic(docInfo);
if (_authService.hasError) { if (_authService.hasError) {
error = _authService.error!; error = _authService.error!;

@ -24,8 +24,8 @@ class DashboardViewModel extends BaseViewModel {
String? get sServiceID => _dashboardService.sServiceID; String? get sServiceID => _dashboardService.sServiceID;
List<GetSpecialClinicalCareListResponseModel> get specialClinicalCareList => _specialClinicsService.specialClinicalCareList; List<GetSpecialClinicalCareListResponseModel> get specialClinicalCareList =>
_specialClinicsService.specialClinicalCareList;
Future setFirebaseNotification(ProjectViewModel projectsProvider, AuthenticationViewModel authProvider) async { Future setFirebaseNotification(ProjectViewModel projectsProvider, AuthenticationViewModel authProvider) async {
setState(ViewState.Busy); setState(ViewState.Busy);
@ -82,7 +82,7 @@ class DashboardViewModel extends BaseViewModel {
); );
await authProvider.getDoctorProfileBasedOnClinic(clinicModel); await authProvider.getDoctorProfileBasedOnClinic(clinicModel);
if (authProvider.state == ViewState.ErrorLocal) { if (authProvider.state == ViewState.ErrorLocal) {
error = authProvider.error!; error = authProvider.error;
} }
} }
@ -93,16 +93,14 @@ class DashboardViewModel extends BaseViewModel {
return value.toString(); return value.toString();
} }
GetSpecialClinicalCareListResponseModel? getSpecialClinic(clinicId) {
GetSpecialClinicalCareListResponseModel? getSpecialClinic(clinicId){ GetSpecialClinicalCareListResponseModel? special;
GetSpecialClinicalCareListResponseModel? special ;
specialClinicalCareList.forEach((element) { specialClinicalCareList.forEach((element) {
if(element.clinicID == 1){ if (element.clinicID == 1) {
special = element; special = element;
} }
}); });
return special; return special;
} }
} }

@ -110,7 +110,7 @@ class PatientViewModel extends BaseViewModel {
setState(ViewState.Busy); setState(ViewState.Busy);
await _patientService.getPatientRadiology(patient); await _patientService.getPatientRadiology(patient);
if (_patientService.hasError) { if (_patientService.hasError) {
error = _patientService.error!!; error = _patientService.error!;
setState(ViewState.Error); setState(ViewState.Error);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);

@ -23,8 +23,7 @@ import 'package:doctor_app_flutter/screens/procedures/ProcedureType.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/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart' import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart' as cpe;
as cpe;
class ProcedureViewModel extends BaseViewModel { class ProcedureViewModel extends BaseViewModel {
//TODO Hussam clean it //TODO Hussam clean it
@ -78,15 +77,12 @@ class ProcedureViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getProcedureCategory( Future getProcedureCategory({String? categoryName, String? categoryID, patientId}) async {
{String? categoryName, String? categoryID, patientId}) async {
if (categoryName == null) return; if (categoryName == null) return;
hasError = false; hasError = false;
setState(ViewState.Busy); setState(ViewState.Busy);
await _procedureService.getProcedureCategory( await _procedureService.getProcedureCategory(
categoryName: categoryName, categoryName: categoryName, categoryID: categoryID, patientId: patientId);
categoryID: categoryID,
patientId: patientId);
if (_procedureService.hasError) { if (_procedureService.hasError) {
error = _procedureService.error!; error = _procedureService.error!;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -318,14 +314,13 @@ class ProcedureViewModel extends BaseViewModel {
{String? remarks, {String? remarks,
String? orderType, String? orderType,
PatiantInformtion? patient, PatiantInformtion? patient,
List<cpe.EntityList> ? entityList, List<cpe.EntityList>? entityList,
ProcedureType? procedureType}) async { ProcedureType? procedureType}) async {
PostProcedureReqModel postProcedureReqModel = new PostProcedureReqModel(); PostProcedureReqModel postProcedureReqModel = new PostProcedureReqModel();
ProcedureValadteRequestModel procedureValadteRequestModel = ProcedureValadteRequestModel procedureValadteRequestModel = new ProcedureValadteRequestModel();
new ProcedureValadteRequestModel();
procedureValadteRequestModel.patientMRN = patient!.patientMRN; procedureValadteRequestModel.patientMRN = patient!.patientMRN;
procedureValadteRequestModel.episodeID = patient!.episodeNo; procedureValadteRequestModel.episodeID = patient.episodeNo;
procedureValadteRequestModel.appointmentNo = patient!.appointmentNo; procedureValadteRequestModel.appointmentNo = patient.appointmentNo;
List<Procedures> controlsProcedure = []; List<Procedures> controlsProcedure = [];
@ -334,31 +329,23 @@ class ProcedureViewModel extends BaseViewModel {
postProcedureReqModel.patientMRN = patient.patientMRN; postProcedureReqModel.patientMRN = patient.patientMRN;
entityList!.forEach((element) { entityList!.forEach((element) {
procedureValadteRequestModel.procedure = [element!.procedureId!]; procedureValadteRequestModel.procedure = [element.procedureId!];
List<Controls> controls = []; List<Controls> controls = [];
controls.add( controls.add(
Controls( Controls(code: "remarks", controlValue: element.remarks != null ? element.remarks : ""),
code: "remarks",
controlValue: element.remarks != null ? element.remarks : ""),
); );
controls.add( controls.add(
Controls( Controls(code: "ordertype", controlValue: procedureType == ProcedureType.PROCEDURE ? element.type ?? "1" : "0"),
code: "ordertype",
controlValue: procedureType == ProcedureType.PROCEDURE
? element.type ?? "1"
: "0"),
); );
controlsProcedure.add(Procedures( controlsProcedure
category: element.categoryID, .add(Procedures(category: element.categoryID, procedure: element.procedureId, controls: controls));
procedure: element.procedureId,
controls: controls));
}); });
postProcedureReqModel.procedures = controlsProcedure; postProcedureReqModel.procedures = controlsProcedure;
await valadteProcedure(procedureValadteRequestModel); await valadteProcedure(procedureValadteRequestModel);
if (state == ViewState.Idle) { if (state == ViewState.Idle) {
if (valadteProcedureList[0].entityList!.length == 0) { if (valadteProcedureList[0].entityList!.length == 0) {
await postProcedure(postProcedureReqModel, patient!.patientMRN!); await postProcedure(postProcedureReqModel, patient.patientMRN!);
if (state == ViewState.ErrorLocal) { if (state == ViewState.ErrorLocal) {
Helpers.showErrorToast(error); Helpers.showErrorToast(error);
@ -371,8 +358,7 @@ class ProcedureViewModel extends BaseViewModel {
Helpers.showErrorToast(error); Helpers.showErrorToast(error);
getProcedure(mrn: patient.patientMRN); getProcedure(mrn: patient.patientMRN);
} else if (state == ViewState.Idle) { } else if (state == ViewState.Idle) {
Helpers.showErrorToast( Helpers.showErrorToast(valadteProcedureList[0].entityList![0].warringMessages);
valadteProcedureList[0].entityList![0].warringMessages);
} }
} }
} else { } else {

@ -17,7 +17,7 @@ Helpers helpers = Helpers();
class ProjectViewModel with ChangeNotifier { class ProjectViewModel with ChangeNotifier {
DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = DrAppSharedPreferances();
late Locale _appLocale = Locale(currentLanguage ); late Locale _appLocale = Locale(currentLanguage);
String currentLanguage = 'ar'; String currentLanguage = 'ar';
bool _isArabic = false; bool _isArabic = false;
bool isInternetConnection = true; bool isInternetConnection = true;
@ -52,7 +52,7 @@ class ProjectViewModel with ChangeNotifier {
void loadSharedPrefLanguage() async { void loadSharedPrefLanguage() async {
currentLanguage = await sharedPref.getString(APP_Language); currentLanguage = await sharedPref.getString(APP_Language);
_appLocale = Locale(currentLanguage ?? 'en'); _appLocale = Locale(currentLanguage);
_isArabic = currentLanguage != null _isArabic = currentLanguage != null
? currentLanguage == 'ar' ? currentLanguage == 'ar'
? true ? true

@ -61,53 +61,50 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort?6:4), height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 6 : 4),
), ),
if(authenticationViewModel.isFromLogin) if (authenticationViewModel.isFromLogin)
InkWell( InkWell(
onTap: (){ onTap: () {
authenticationViewModel.setUnverified(false,isFromLogin: false); authenticationViewModel.setUnverified(false, isFromLogin: false);
authenticationViewModel.setAppStatus(APP_STATUS.UNAUTHENTICATED); authenticationViewModel.setAppStatus(APP_STATUS.UNAUTHENTICATED);
}, },
child: Icon(Icons.arrow_back_ios,color: Color(0xFF2B353E),) child: Icon(
Icons.arrow_back_ios,
), color: Color(0xFF2B353E),
)),
Column( Column(
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: SizeConfig.heightMultiplier*(SizeConfig.isHeightVeryShort?3:4), height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 3 : 4),
), ),
authenticationViewModel.user != null && isMoreOption == false authenticationViewModel.user != null && isMoreOption == false
? Column( ? Column(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceEvenly,
MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of(context).welcomeBack, TranslationBase.of(context).welcomeBack,
fontSize:SizeConfig.getTextMultiplierBasedOnWidth()*4, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
), ),
AppText( AppText(
Helpers.capitalize(authenticationViewModel.user!.doctorName), Helpers.capitalize(authenticationViewModel.user!.doctorName),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth()*6, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 6,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
SizedBox( SizedBox(
height: SizeConfig.heightMultiplier*4, height: SizeConfig.heightMultiplier * 4,
), ),
AppText( AppText(
TranslationBase.of(context).accountInfo , TranslationBase.of(context).accountInfo,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth()*5, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 5,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
SizedBox( SizedBox(height: SizeConfig.heightMultiplier * 4),
height: SizeConfig.heightMultiplier*4
),
Container( Container(
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -115,9 +112,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(10), Radius.circular(10),
), ),
border: Border.all( border: Border.all(color: HexColor('#707070'), width: 0.1),
color: HexColor('#707070'),
width: 0.1),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -130,159 +125,118 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Text( Text(
TranslationBase.of(context) TranslationBase.of(context).lastLoginAt!,
.lastLoginAt!,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5,
.getTextMultiplierBasedOnWidth() *
4.5,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
), ),
Container( Container(
width: MediaQuery.of(context) width: MediaQuery.of(context).size.width * 0.55,
.size
.width *
0.55,
child: RichText( child: RichText(
text: TextSpan( text: TextSpan(
text: TranslationBase.of(context).verifyWith, text: TranslationBase.of(context).verifyWith,
style: TextStyle( style: TextStyle(
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: SizeConfig fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5,
.getTextMultiplierBasedOnWidth() *
4.5,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
children: <TextSpan>[ children: <TextSpan>[
TextSpan( TextSpan(
text: authenticationViewModel text: authenticationViewModel.getType(
.getType( authenticationViewModel.user!.logInTypeID, context),
authenticationViewModel
.user
!.logInTypeID,
context),
style: TextStyle( style: TextStyle(
color: color: Color(0xFF2B353E),
Color(0xFF2B353E), fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5,
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
4.5,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: fontWeight: FontWeight.w700,
FontWeight.w700,
), ),
) )
]), ]),
), ),
), ),
], ],
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
), ),
), ),
Column( Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
authenticationViewModel authenticationViewModel.user!.editedOn != null
.user!.editedOn != ? AppDateUtils.getDayMonthYearDateFormatted(
null AppDateUtils.convertStringToDate(
? AppDateUtils authenticationViewModel.user!.editedOn!))
.getDayMonthYearDateFormatted( : authenticationViewModel.user!.createdOn! != null
AppDateUtils
.convertStringToDate(
authenticationViewModel
! .user
!.editedOn!))
: authenticationViewModel
.user!.createdOn! !=
null
? AppDateUtils.getDayMonthYearDateFormatted( ? AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils.convertStringToDate(authenticationViewModel!.user AppDateUtils.convertStringToDate(
!.createdOn!)) authenticationViewModel.user!.createdOn!))
: '--', : '--',
textAlign: textAlign: TextAlign.right,
TextAlign.right, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *4.5,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
AppText( AppText(
authenticationViewModel.user!.editedOn != authenticationViewModel.user!.editedOn != null
null ? AppDateUtils.getHour(AppDateUtils.convertStringToDate(
? AppDateUtils.getHour( authenticationViewModel.user!.editedOn!))
AppDateUtils.convertStringToDate( : authenticationViewModel.user!.createdOn != null
authenticationViewModel!.user ? AppDateUtils.getHour(AppDateUtils.convertStringToDate(
!.editedOn!)) authenticationViewModel.user!.createdOn!))
: authenticationViewModel.user!.createdOn !=
null
? AppDateUtils.getHour(
AppDateUtils.convertStringToDate(authenticationViewModel!.user
!.createdOn!))
: '--', : '--',
textAlign: textAlign: TextAlign.right,
TextAlign.right, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *4.5,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xFF575757), color: Color(0xFF575757),
) )
], ],
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
) )
], ],
), ),
), ),
SizedBox( SizedBox(
height: SizeConfig.heightMultiplier*3, height: SizeConfig.heightMultiplier * 3,
), ),
Row( Row(
children: [ children: [
//todo add translation //todo add translation
AppText( AppText(
"Please Verify", "Please Verify",
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 5, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 5,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
], ],
), ),
SizedBox( SizedBox(
height: SizeConfig.heightMultiplier*2, height: SizeConfig.heightMultiplier * 2,
), ),
], ],
) )
: Column( : Column(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceEvenly,
MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
this.onlySMSBox == false this.onlySMSBox == false
? Container( ? Container(
margin: EdgeInsets.only(bottom: 20, top: 30), margin: EdgeInsets.only(bottom: 20, top: 30),
child: AppText( child: AppText(
TranslationBase.of(context) TranslationBase.of(context).verifyLoginWith,
.verifyLoginWith , fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth()* 4 ,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
textAlign: TextAlign.left, textAlign: TextAlign.left,
), ),
) )
: AppText( : AppText(
TranslationBase.of(context) TranslationBase.of(context).verifyFingerprint2,
.verifyFingerprint2, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4,
fontSize:
SizeConfig.getTextMultiplierBasedOnWidth()* 4,
textAlign: TextAlign.start, textAlign: TextAlign.start,
), ),
]), ]),
@ -291,39 +245,25 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Row( Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () => onTap: () => {
{
// TODO check this logic it seem it will create bug to us // TODO check this logic it seem it will create bug to us
authenticateUser( authenticateUser(AuthMethodTypes.Fingerprint, true)
AuthMethodTypes
.Fingerprint, true)
}, },
child: VerificationMethodsList( child: VerificationMethodsList(
authenticationViewModel:authenticationViewModel, authenticationViewModel: authenticationViewModel,
authMethodType: SelectedAuthMethodTypesService authMethodType: SelectedAuthMethodTypesService.getMethodsTypeService(
.getMethodsTypeService( authenticationViewModel.user!.logInTypeID!),
authenticationViewModel!.user authenticateUser: (AuthMethodTypes authMethodType, isActive) =>
!.logInTypeID!!), authenticateUser(authMethodType, isActive),
authenticateUser:
(AuthMethodTypes
authMethodType,
isActive) =>
authenticateUser(
authMethodType,
isActive),
)), )),
), ),
Expanded( Expanded(
child: VerificationMethodsList( child: VerificationMethodsList(
authenticationViewModel:authenticationViewModel, authenticationViewModel: authenticationViewModel,
authMethodType: authMethodType: AuthMethodTypes.MoreOptions,
AuthMethodTypes.MoreOptions,
onShowMore: () { onShowMore: () {
setState(() { setState(() {
isMoreOption = true; isMoreOption = true;
@ -338,65 +278,41 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
children: <Widget>[ children: <Widget>[
onlySMSBox == false onlySMSBox == false
? Row( ? Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.center,
MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: VerificationMethodsList( child: VerificationMethodsList(
authenticationViewModel:authenticationViewModel, authenticationViewModel: authenticationViewModel,
authMethodType: authMethodType: AuthMethodTypes.Fingerprint,
AuthMethodTypes.Fingerprint, authenticateUser: (AuthMethodTypes authMethodType, isActive) =>
authenticateUser: authenticateUser(authMethodType, isActive),
(AuthMethodTypes
authMethodType,
isActive) =>
authenticateUser(
authMethodType,
isActive),
)), )),
Expanded( Expanded(
child: VerificationMethodsList( child: VerificationMethodsList(
authenticationViewModel:authenticationViewModel, authenticationViewModel: authenticationViewModel,
authMethodType: authMethodType: AuthMethodTypes.FaceID,
AuthMethodTypes.FaceID, authenticateUser: (AuthMethodTypes authMethodType, isActive) =>
authenticateUser: authenticateUser(authMethodType, isActive),
(AuthMethodTypes
authMethodType,
isActive) =>
authenticateUser(
authMethodType,
isActive),
)) ))
], ],
) )
: SizedBox(), : SizedBox(),
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.center,
MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: VerificationMethodsList( child: VerificationMethodsList(
authenticationViewModel:authenticationViewModel, authenticationViewModel: authenticationViewModel,
authMethodType: AuthMethodTypes authMethodType: AuthMethodTypes.SMS,
.SMS, authenticateUser: (AuthMethodTypes authMethodType, isActive) =>
authenticateUser: authenticateUser(authMethodType, isActive),
(
AuthMethodTypes authMethodType,
isActive) =>
authenticateUser(
authMethodType, isActive),
)), )),
Expanded( Expanded(
child: VerificationMethodsList( child: VerificationMethodsList(
authenticationViewModel:authenticationViewModel, authenticationViewModel: authenticationViewModel,
authMethodType: authMethodType: AuthMethodTypes.WhatsApp,
AuthMethodTypes.WhatsApp, authenticateUser: (AuthMethodTypes authMethodType, isActive) =>
authenticateUser: authenticateUser(authMethodType, isActive),
(
AuthMethodTypes authMethodType,
isActive) =>
authenticateUser(
authMethodType, isActive),
)) ))
], ],
), ),
@ -410,9 +326,13 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
), ),
), ),
), ),
bottomSheet: authenticationViewModel.user == null ? SizedBox(height: 0,) : Container( bottomSheet: authenticationViewModel.user == null
? SizedBox(
height: 0,
)
: Container(
// color: Colors.green, // color: Colors.green,
height: SizeConfig.heightMultiplier * 10 , height: SizeConfig.heightMultiplier * 10,
width: double.infinity, width: double.infinity,
child: Center( child: Center(
child: FractionallySizedBox( child: FractionallySizedBox(
@ -421,25 +341,21 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
AppButton( AppButton(
title: TranslationBase title: TranslationBase.of(context).useAnotherAccount,
.of(context)
.useAnotherAccount,
color: Color(0xFFD02127), color: Color(0xFFD02127),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort? 8 : 6), height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 8 : 6),
hPadding: 1, hPadding: 1,
onPressed: () { onPressed: () {
authenticationViewModel.deleteUser(); authenticationViewModel.deleteUser();
authenticationViewModel.setAppStatus(APP_STATUS.UNAUTHENTICATED); authenticationViewModel.setAppStatus(APP_STATUS.UNAUTHENTICATED);
}, },
), ),
], ],
), ),
), ),
),), ),
),
); );
} }

@ -1,4 +1,3 @@
import 'package:charts_flutter/flutter.dart' as charts; import 'package:charts_flutter/flutter.dart' as charts;
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
@ -29,16 +28,11 @@ class DashboardReferralPatient extends StatelessWidget {
shadowDy: 1, shadowDy: 1,
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10), margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
child: child:
Column( Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded( Expanded(
flex: 1, flex: 1,
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Expanded( Expanded(
flex: 4, flex: 4,
@ -51,49 +45,37 @@ class DashboardReferralPatient extends StatelessWidget {
Padding( Padding(
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.center,
MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
SizedBox( SizedBox(
height: SizeConfig height: SizeConfig.getHeightMultiplier(height: height) *
.getHeightMultiplier(
height: height) *
(SizeConfig.isHeightVeryShort (SizeConfig.isHeightVeryShort
? 3 ? 3
: SizeConfig.isHeightShort : SizeConfig.isHeightShort
? 2 ? 2
: 2) : 2)),
), Label(
Label(firstLine: TranslationBase firstLine: TranslationBase.of(context).patients,
.of(context) secondLine: TranslationBase.of(context).referral,
.patients,
secondLine: TranslationBase
.of(context)
.referral,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
secondLineFontSize: SizeConfig secondLineFontSize: SizeConfig.getHeightMultiplier(height: height) *
.getHeightMultiplier(
height: height) *
(SizeConfig.isHeightVeryShort (SizeConfig.isHeightVeryShort
? 5 ? 5
: SizeConfig.isHeightShort : SizeConfig.isHeightShort
? 7 ? 7
: 12),), : 12),
),
SizedBox( SizedBox(
height: SizeConfig height: SizeConfig.getHeightMultiplier(height: height) *
.getHeightMultiplier(
height: height) *
(SizeConfig.isHeightVeryShort (SizeConfig.isHeightVeryShort
? 5 ? 5
: SizeConfig.isHeightShort : SizeConfig.isHeightShort
? 10 ? 10
: 5) : 5))
)
], ],
),), ),
),
Expanded( Expanded(
flex: 1, flex: 1,
child: Column( child: Column(
@ -101,30 +83,23 @@ class DashboardReferralPatient extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
RowCounts( RowCounts(
dashboardItemList![2] dashboardItemList![2].summaryoptions![0].kPIParameter,
.summaryoptions![0] dashboardItemList![2].summaryoptions![0].value!,
.kPIParameter, Colors.black,
dashboardItemList![2] height: height!,
.summaryoptions![0] ),
.value!,
Colors.black, height: height!,),
RowCounts( RowCounts(
dashboardItemList![2] dashboardItemList![2].summaryoptions![1].kPIParameter,
.summaryoptions![1] dashboardItemList![2].summaryoptions![1].value!,
.kPIParameter, Colors.grey,
dashboardItemList![2] height: height!,
.summaryoptions![1] ),
.value!,
Colors.grey, height: height!,),
RowCounts( RowCounts(
dashboardItemList![2].summaryoptions![2].kPIParameter,
dashboardItemList![2] dashboardItemList![2].summaryoptions![2].value!,
.summaryoptions![2] Colors.red,
.kPIParameter, height: height!,
dashboardItemList![2] ),
.summaryoptions![2]
.value!,
Colors.red, height: height!,),
], ],
), ),
) )
@ -134,25 +109,19 @@ class DashboardReferralPatient extends StatelessWidget {
Expanded( Expanded(
flex: 3, flex: 3,
child: Stack(children: [ child: Stack(children: [
Container( Container(padding: EdgeInsets.all(0), child: GaugeChart(_createReferralData(dashboardItemList!))),
padding:EdgeInsets.all(0),
child: GaugeChart(
_createReferralData(dashboardItemList!))),
Positioned( Positioned(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
AppText( AppText(
model! model!.getPatientCount(dashboardItemList![2]).toString(),
.getPatientCount(dashboardItemList![2])
.toString(),
fontSize: SizeConfig.textMultiplier * 3.0, fontSize: SizeConfig.textMultiplier * 3.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
) )
], ],
), ),
top: height! * (SizeConfig.isHeightVeryShort?0.35:0.40), top: height! * (SizeConfig.isHeightVeryShort ? 0.35 : 0.40),
left: 0, left: 0,
right: 0) right: 0)
]), ]),
@ -161,20 +130,15 @@ class DashboardReferralPatient extends StatelessWidget {
)), )),
])); ]));
} }
static List<charts.Series<GaugeSegment, String>> _createReferralData(List<DashboardModel> dashboardItemList) { static List<charts.Series<GaugeSegment, String>> _createReferralData(List<DashboardModel> dashboardItemList) {
final data = [ final data = [
new GaugeSegment( new GaugeSegment(dashboardItemList[2].summaryoptions![0].kPIParameter!,
dashboardItemList![2].summaryoptions![0].kPIParameter!, getValue(dashboardItemList[1].summaryoptions![0].value), charts.MaterialPalette.black),
getValue(dashboardItemList![1].summaryoptions![0].value), new GaugeSegment(dashboardItemList[2].summaryoptions![1].kPIParameter!,
charts.MaterialPalette.black), getValue(dashboardItemList[1].summaryoptions![1].value), charts.MaterialPalette.gray.shadeDefault),
new GaugeSegment( new GaugeSegment(dashboardItemList[2].summaryoptions![2].kPIParameter!,
dashboardItemList![2].summaryoptions![1].kPIParameter!, getValue(dashboardItemList[1].summaryoptions![2].value), charts.MaterialPalette.red.shadeDefault),
getValue(dashboardItemList[1].summaryoptions![1].value),
charts.MaterialPalette.gray.shadeDefault),
new GaugeSegment(
dashboardItemList[2].summaryoptions![2].kPIParameter!,
getValue(dashboardItemList[1].summaryoptions![2].value),
charts.MaterialPalette.red.shadeDefault),
]; ];
return [ return [
@ -191,5 +155,4 @@ class DashboardReferralPatient extends StatelessWidget {
static int getValue(value) { static int getValue(value) {
return value == 0 ? 1 : value; return value == 0 ? 1 : value;
} }
} }

@ -18,15 +18,21 @@ class DashboardSliderItemWidget extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Label(firstLine:Helpers.getLabelFromKPI(item!.kPIName!) ,secondLine:Helpers.getNameFromKPI(item!.kPIName!), ), Label(
firstLine: Helpers.getLabelFromKPI(item.kPIName!),
secondLine: Helpers.getNameFromKPI(item.kPIName!),
),
], ],
), ),
new Container( new Container(
height: SizeConfig.heightMultiplier* (SizeConfig.isHeightVeryShort?16:SizeConfig.isHeightShort?14:SizeConfig.isHeightLarge?15:13), height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort
? 16
: SizeConfig.isHeightShort
? 14
: SizeConfig.isHeightLarge
? 15
: 13),
child: ListView( child: ListView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
children: List.generate(item.summaryoptions!.length, (int index) { children: List.generate(item.summaryoptions!.length, (int index) {

@ -38,8 +38,8 @@ class HomeScreen extends StatefulWidget {
class _HomeScreenState extends State<HomeScreen> { class _HomeScreenState extends State<HomeScreen> {
bool isLoading = false; bool isLoading = false;
ProjectViewModel ?projectsProvider; ProjectViewModel? projectsProvider;
DoctorProfileModel ?profile; DoctorProfileModel? profile;
bool isExpanded = false; bool isExpanded = false;
bool isInpatient = false; bool isInpatient = false;
int sliderActiveIndex = 0; int sliderActiveIndex = 0;
@ -48,7 +48,6 @@ class _HomeScreenState extends State<HomeScreen> {
int colorIndex = 0; int colorIndex = 0;
final GlobalKey<ScaffoldState> scaffoldKey = new GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> scaffoldKey = new GlobalKey<ScaffoldState>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectsProvider = Provider.of<ProjectViewModel>(context); ProjectViewModel projectsProvider = Provider.of<ProjectViewModel>(context);
@ -60,7 +59,6 @@ class _HomeScreenState extends State<HomeScreen> {
} }
return BaseView<DashboardViewModel>( return BaseView<DashboardViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
await model.setFirebaseNotification(projectsProvider, authenticationViewModel); await model.setFirebaseNotification(projectsProvider, authenticationViewModel);
await model.getDashboard(); await model.getDashboard();
@ -73,7 +71,7 @@ class _HomeScreenState extends State<HomeScreen> {
isShowAppBar: true, isShowAppBar: true,
appBar: HomeScreenHeader( appBar: HomeScreenHeader(
model: model, model: model,
onOpenDrawer: (){ onOpenDrawer: () {
Scaffold.of(context).openDrawer(); Scaffold.of(context).openDrawer();
}, },
), ),
@ -108,13 +106,10 @@ class _HomeScreenState extends State<HomeScreen> {
height: SizeConfig.heightMultiplier * 3, height: SizeConfig.heightMultiplier * 3,
), ),
sliderActiveIndex == 1 sliderActiveIndex == 1
? DashboardSliderItemWidget( ? DashboardSliderItemWidget(model.dashboardItemsList[4])
model.dashboardItemsList[4])
: sliderActiveIndex == 0 : sliderActiveIndex == 0
? DashboardSliderItemWidget( ? DashboardSliderItemWidget(model.dashboardItemsList[3])
model.dashboardItemsList[3]) : DashboardSliderItemWidget(model.dashboardItemsList[6]),
: DashboardSliderItemWidget(
model.dashboardItemsList[6]),
], ],
), ),
), ),
@ -131,7 +126,8 @@ class _HomeScreenState extends State<HomeScreen> {
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(70), topRight: Radius.circular(70),
)), )),
padding: EdgeInsets.only(left: SizeConfig.widthMultiplier * 3.1, top: 10, right: SizeConfig.widthMultiplier * 3.1), padding: EdgeInsets.only(
left: SizeConfig.widthMultiplier * 3.1, top: 10, right: SizeConfig.widthMultiplier * 3.1),
margin: EdgeInsets.only(top: 10), margin: EdgeInsets.only(top: 10),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
@ -154,7 +150,9 @@ class _HomeScreenState extends State<HomeScreen> {
? 16 ? 16
: SizeConfig.isHeightShort : SizeConfig.isHeightShort
? 14 ? 14
: SizeConfig.isHeightLarge?15:13), : SizeConfig.isHeightLarge
? 15
: 13),
child: ListView( child: ListView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
children: [ children: [
@ -162,8 +160,13 @@ class _HomeScreenState extends State<HomeScreen> {
], ],
), ),
), ),
SizedBox(height: SizeConfig.heightMultiplier* (SizeConfig.isHeightVeryShort?3:SizeConfig.isHeightShort?4:2)) SizedBox(
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort
? 3
: SizeConfig.isHeightShort
? 4
: 2))
], ],
), ),
), ),
@ -174,7 +177,7 @@ class _HomeScreenState extends State<HomeScreen> {
); );
} }
List<Widget> homePatientsCardsWidget(DashboardViewModel model,projectsProvider) { List<Widget> homePatientsCardsWidget(DashboardViewModel model, projectsProvider) {
colorIndex = 0; colorIndex = 0;
// List<Color> backgroundColors = List(3); // List<Color> backgroundColors = List(3);
@ -193,7 +196,6 @@ class _HomeScreenState extends State<HomeScreen> {
// List<HomePatientCard> patientCards = []; // List<HomePatientCard> patientCards = [];
// //
List<Color> backgroundColors = []; List<Color> backgroundColors = [];
backgroundColors.add(Color(0xffD02127)); backgroundColors.add(Color(0xffD02127));
backgroundColors.add(Colors.grey[300]!); backgroundColors.add(Colors.grey[300]!);
@ -239,8 +241,9 @@ class _HomeScreenState extends State<HomeScreen> {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: PatientInPatientScreen(specialClinic: model!.getSpecialClinic(clinicId??projectsProvider page: PatientInPatientScreen(
!.doctorClinicsList[0]!.clinicID!),), specialClinic: model.getSpecialClinic(clinicId ?? projectsProvider!.doctorClinicsList[0]!.clinicID!),
),
), ),
); );
}, },
@ -327,6 +330,3 @@ class _HomeScreenState extends State<HomeScreen> {
} }
} }
} }

@ -113,7 +113,7 @@ class _LivaCareTransferToAdminState extends State<LivaCareTransferToAdmin> {
() async { () async {
Navigator.of(context).pop(); Navigator.of(context).pop();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await model.transferToAdmin(widget!.patient!.vcId!, noteController.text); await model.transferToAdmin(widget.patient.vcId!, noteController.text);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error); DrAppToastMsg.showErrorToast(model.error);

@ -104,8 +104,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
isPrescriptions: true, isPrescriptions: true,
isMedicalFile: true, isMedicalFile: true,
episode: episode, episode: episode,
visitDate: visitDate: '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(
'${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(
vistDate, vistDate,
), isArabic: projectViewModel.isArabic)}', ), isArabic: projectViewModel.isArabic)}',
isAppointmentHeader: true, isAppointmentHeader: true,
@ -128,15 +127,10 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
model.getMedicalFile(mrn: pp); model.getMedicalFile(mrn: pp);
} }
}, },
builder: builder: (BuildContext? context, MedicalFileViewModel? model, Widget? child) => AppScaffold(
(BuildContext? context, MedicalFileViewModel? model, Widget ?child) =>
AppScaffold(
patientProfileAppBarModel: patientProfileAppBarModel!, patientProfileAppBarModel: patientProfileAppBarModel!,
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase appBarTitle: TranslationBase.of(context!).medicalReport!.toUpperCase(),
.of(context!)!
.medicalReport!
.toUpperCase(),
body: NetworkBaseView( body: NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: SingleChildScrollView( child: SingleChildScrollView(
@ -144,14 +138,9 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
model!.medicalFileList!.length != 0 && model!.medicalFileList.length != 0 &&
model model.medicalFileList[0].entityList![0].timelines![encounterNumber].timeLineEvents![0]
.medicalFileList![0] .consulations!.length !=
.entityList![0]
.timelines![encounterNumber]
.timeLineEvents![0]
.consulations!
.length !=
0 0
? Padding( ? Padding(
padding: EdgeInsets.all(10.0), padding: EdgeInsets.all(10.0),
@ -160,7 +149,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
children: [ children: [
SizedBox(height: 25.0), SizedBox(height: 25.0),
if (model.medicalFileList.length != 0 && if (model.medicalFileList.length != 0 &&
model.medicalFileList![0].entityList![0].timelines![encounterNumber] model.medicalFileList[0].entityList![0].timelines![encounterNumber]
.timeLineEvents![0].consulations!.length != .timeLineEvents![0].consulations!.length !=
0) 0)
Container( Container(
@ -205,7 +194,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
itemCount: model itemCount: model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -224,7 +213,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
Expanded( Expanded(
child: AppText( child: AppText(
model model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -254,7 +243,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
height: 30, height: 30,
), ),
if (model.medicalFileList.length != 0 && if (model.medicalFileList.length != 0 &&
model.medicalFileList![0].entityList![0].timelines![encounterNumber] model.medicalFileList[0].entityList![0].timelines![encounterNumber]
.timeLineEvents![0].consulations!.length != .timeLineEvents![0].consulations!.length !=
0) 0)
Container( Container(
@ -297,7 +286,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
itemCount: model itemCount: model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -319,7 +308,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
), ),
AppText( AppText(
model model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -342,7 +331,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
Expanded( Expanded(
child: AppText( child: AppText(
model model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -361,7 +350,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
Expanded( Expanded(
child: AppText( child: AppText(
model model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -383,7 +372,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
Expanded( Expanded(
child: AppText( child: AppText(
model model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -401,7 +390,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
), ),
AppText( AppText(
model model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -432,7 +421,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
height: 30, height: 30,
), ),
if (model.medicalFileList.length != 0 && if (model.medicalFileList.length != 0 &&
model.medicalFileList![0].entityList![0].timelines![encounterNumber] model.medicalFileList[0].entityList![0].timelines![encounterNumber]
.timeLineEvents![0].consulations!.length != .timeLineEvents![0].consulations!.length !=
0) 0)
Container( Container(
@ -475,7 +464,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
itemCount: model itemCount: model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -498,7 +487,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
), ),
AppText( AppText(
model model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -520,7 +509,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
AppText( AppText(
AppDateUtils.getDateFormatted(DateTime.parse( AppDateUtils.getDateFormatted(DateTime.parse(
model model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -544,7 +533,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
Expanded( Expanded(
child: AppText( child: AppText(
model model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -563,7 +552,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
), ),
AppText( AppText(
model model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -600,7 +589,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
height: 30, height: 30,
), ),
if (model.medicalFileList.length != 0 && if (model.medicalFileList.length != 0 &&
model.medicalFileList![0].entityList![0].timelines![encounterNumber] model.medicalFileList[0].entityList![0].timelines![encounterNumber]
.timeLineEvents![0].consulations!.length != .timeLineEvents![0].consulations!.length !=
0) 0)
Container( Container(
@ -645,7 +634,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
itemCount: model itemCount: model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -663,7 +652,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
AppText(TranslationBase.of(context).examType! + ": "), AppText(TranslationBase.of(context).examType! + ": "),
AppText( AppText(
model model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -678,7 +667,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
children: [ children: [
AppText( AppText(
model model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -694,7 +683,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
AppText(TranslationBase.of(context).abnormal! + ": "), AppText(TranslationBase.of(context).abnormal! + ": "),
AppText( AppText(
model model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]
@ -710,7 +699,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
), ),
AppText( AppText(
model model
.medicalFileList![0] .medicalFileList[0]
.entityList![0] .entityList![0]
.timelines![encounterNumber] .timelines![encounterNumber]
.timeLineEvents![0] .timeLineEvents![0]

@ -62,15 +62,18 @@ class _InPatientPageState extends State<InPatientPage> {
model.filterSearchResults(value); model.filterSearchResults(value);
}), }),
), ),
model.state == ViewState.Idle?model.filteredInPatientItems.length > 0 model.state == ViewState.Idle
? model.filteredInPatientItems.length > 0
? Expanded( ? Expanded(
child: Container( child: Container(
margin: EdgeInsets.symmetric(horizontal: 16.0), margin: EdgeInsets.symmetric(horizontal: 16.0),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: ListView.builder(
crossAxisAlignment: CrossAxisAlignment.start, physics: const AlwaysScrollableScrollPhysics(),
children: [ scrollDirection: Axis.vertical,
...List.generate(model.filteredInPatientItems.length, (index) { shrinkWrap: true,
itemCount: 70,
itemBuilder: (context, index) {
if (!widget.isMyInPatient) if (!widget.isMyInPatient)
return PatientCard( return PatientCard(
patientInfo: model.filteredInPatientItems[index], patientInfo: model.filteredInPatientItems[index],
@ -96,7 +99,8 @@ class _InPatientPageState extends State<InPatientPage> {
}); });
}, },
); );
else if (model.filteredInPatientItems[index].doctorId == model.doctorProfile!.doctorID && else if (model.filteredInPatientItems[index].doctorId ==
model.doctorProfile!.doctorID &&
widget.isMyInPatient) widget.isMyInPatient)
return PatientCard( return PatientCard(
patientInfo: model.filteredInPatientItems[index], patientInfo: model.filteredInPatientItems[index],
@ -125,24 +129,20 @@ class _InPatientPageState extends State<InPatientPage> {
else else
return SizedBox(); return SizedBox();
}), }),
SizedBox(
height: 15,
)
],
),
), ),
), ),
) )
: Expanded( : Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container(child: ErrorMessage(error: TranslationBase.of(context).noDataAvailable ?? "")), child:
Container(child: ErrorMessage(error: TranslationBase.of(context).noDataAvailable ?? "")),
), ),
): Center( )
: Center(
child: Container( child: Container(
height: 300, height: 300,
width: 300, width: 300,
child: Image.asset( child: Image.asset("assets/images/progress-loading-red.gif"),
"assets/images/progress-loading-red.gif"),
), ),
), ),
], ],

@ -37,7 +37,7 @@ class _InsuranceApprovalScreenNewState extends State<InsuranceApprovalScreenNew>
? (model) => model.getInsuranceInPatient(mrn: patient.patientId) ? (model) => model.getInsuranceInPatient(mrn: patient.patientId)
: patient.appointmentNo != null : patient.appointmentNo != null
? (model) => model.getInsuranceApproval(patient, ? (model) => model.getInsuranceApproval(patient,
appointmentNo: patient?.appointmentNo, projectId: patient.projectId) appointmentNo: patient.appointmentNo, projectId: patient.projectId)
: (model) => model.getInsuranceApproval(patient), : (model) => model.getInsuranceApproval(patient),
builder: (BuildContext context, InsuranceViewModel model, Widget? child) => AppScaffold( builder: (BuildContext context, InsuranceViewModel model, Widget? child) => AppScaffold(
patientProfileAppBarModel: PatientProfileAppBarModel( patientProfileAppBarModel: PatientProfileAppBarModel(

@ -32,8 +32,8 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context!); ProjectViewModel projectViewModel = Provider.of(context);
final routeArgs = ModalRoute.of(context!)!.settings.arguments as Map; final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: (model) => model.insuranceApprovalInPatient.length == 0 onModelReady: (model) => model.insuranceApprovalInPatient.length == 0
@ -44,12 +44,10 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
appointmentNo: patient.appointmentNo, projectId: patient.projectId) appointmentNo: patient.appointmentNo, projectId: patient.projectId)
: (model) => model.getInsuranceApproval(patient) : (model) => model.getInsuranceApproval(patient)
: null, : null,
builder: (BuildContext? context, InsuranceViewModel? model, Widget? child) => builder: (BuildContext? context, InsuranceViewModel? model, Widget? child) => AppScaffold(
AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
patientProfileAppBarModel: patientProfileAppBarModel: PatientProfileAppBarModel(patient: patient),
PatientProfileAppBarModel(patient: patient),
body: patient.admissionNo != null body: patient.admissionNo != null
? SingleChildScrollView( ? SingleChildScrollView(
child: Container( child: Container(
@ -72,7 +70,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: [ children: [
AppText( AppText(
TranslationBase.of(context!).approvals22, TranslationBase.of(context).approvals22,
fontSize: 30.0, fontSize: 30.0,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
@ -99,18 +97,11 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: [ children: [
AppText( AppText(
model!.insuranceApprovalInPatient[ model!.insuranceApprovalInPatient[indexInsurance].approvalStatusDescption != null
indexInsurance] ? model.insuranceApprovalInPatient[indexInsurance].approvalStatusDescption ??
.approvalStatusDescption !=
null
? model!.insuranceApprovalInPatient[
indexInsurance]
.approvalStatusDescption ??
"" ""
: "", : "",
color: model!.insuranceApprovalInPatient[ color: model.insuranceApprovalInPatient[indexInsurance].approvalStatusDescption !=
indexInsurance]
.approvalStatusDescption !=
null null
? "${model.insuranceApprovalInPatient[indexInsurance].approvalStatusDescption}" == ? "${model.insuranceApprovalInPatient[indexInsurance].approvalStatusDescption}" ==
"Approved" || "Approved" ||
@ -125,10 +116,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: [ children: [
AppText( AppText(
model!.insuranceApprovalInPatient[ model.insuranceApprovalInPatient[indexInsurance].doctorName!.toUpperCase(),
indexInsurance]
.doctorName!
.toUpperCase(),
color: Colors.black, color: Colors.black,
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -136,8 +124,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
], ],
), ),
Padding( Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(horizontal: 8.0),
horizontal: 8.0),
child: Row( child: Row(
children: [ children: [
Column( Column(
@ -146,36 +133,26 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
height: 85.0, height: 85.0,
width: 85.0, width: 85.0,
child: CircleAvatar( child: CircleAvatar(
radius: SizeConfig radius: SizeConfig.imageSizeMultiplier * 12,
.imageSizeMultiplier *
12,
// radius: (52) // radius: (52)
child: ClipRRect( child: ClipRRect(
borderRadius: borderRadius: BorderRadius.circular(50),
BorderRadius.circular(
50),
child: Image.network( child: Image.network(
model!.insuranceApprovalInPatient[ model.insuranceApprovalInPatient[indexInsurance].doctorImage!,
indexInsurance]
.doctorImage!,
fit: BoxFit.fill, fit: BoxFit.fill,
width: 700, width: 700,
), ),
), ),
backgroundColor: backgroundColor: Colors.transparent,
Colors.transparent,
), ),
), ),
], ],
), ),
Expanded( Expanded(
child: Padding( child: Padding(
padding: padding: const EdgeInsets.symmetric(horizontal: 8.0),
const EdgeInsets.symmetric(
horizontal: 8.0),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
//mainAxisAlignment: MainAxisAlignment.center, //mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
SizedBox( SizedBox(
@ -184,18 +161,13 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: [ children: [
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).clinic! + ": ",
context)
.clinic! +
": ",
color: Colors.grey[500], color: Colors.grey[500],
fontSize: 14, fontSize: 14,
), ),
Expanded( Expanded(
child: AppText( child: AppText(
model!.insuranceApprovalInPatient[ model.insuranceApprovalInPatient[indexInsurance].clinicName,
indexInsurance]
.clinicName,
fontSize: 14, fontSize: 14,
), ),
) )
@ -204,17 +176,12 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).approvalNo! + ": ",
context)
.approvalNo! +
": ",
color: Colors.grey[500], color: Colors.grey[500],
fontSize: 14, fontSize: 14,
), ),
AppText( AppText(
model!.insuranceApprovalInPatient[ model.insuranceApprovalInPatient[indexInsurance].approvalNo
indexInsurance]
.approvalNo
.toString(), .toString(),
fontSize: 14, fontSize: 14,
) )
@ -228,9 +195,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
fontSize: 14, fontSize: 14,
), ),
AppText( AppText(
model!.insuranceApprovalInPatient[ model.insuranceApprovalInPatient[indexInsurance].unUsedCount
indexInsurance]
.unUsedCount
.toString(), .toString(),
fontSize: 14, fontSize: 14,
) )
@ -239,10 +204,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).companyName! + ": ",
context)
.companyName! +
": ",
color: Colors.grey[500], color: Colors.grey[500],
), ),
AppText('Sample') AppText('Sample')
@ -251,18 +213,14 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: [ children: [
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).receiptOn! + ": ",
context)
.receiptOn! +
": ",
color: Colors.grey[500], color: Colors.grey[500],
), ),
Expanded( Expanded(
child: AppText( child: AppText(
'${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].receiptOn!), isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].receiptOn!), isArabic: projectViewModel.isArabic)}',
color: Colors.black, color: Colors.black,
fontWeight: fontWeight: FontWeight.w600,
FontWeight.w600,
), ),
), ),
], ],
@ -270,17 +228,13 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: [ children: [
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).expiryDate! + ": ",
context)
.expiryDate! +
": ",
color: Colors.grey[500], color: Colors.grey[500],
), ),
AppText( AppText(
'${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].expiryDate!), isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].expiryDate!), isArabic: projectViewModel.isArabic)}',
color: Colors.black, color: Colors.black,
fontWeight: fontWeight: FontWeight.w600,
FontWeight.w600,
), ),
], ],
), ),
@ -298,28 +252,24 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
child: Column( child: Column(
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(horizontal: 8.0),
horizontal: 8.0),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
child: AppText( child: AppText(
TranslationBase.of(context!) TranslationBase.of(context).procedure,
.procedure,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
), ),
Expanded( Expanded(
child: AppText( child: AppText(
TranslationBase.of(context!) TranslationBase.of(context).status,
.status,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
), ),
Expanded( Expanded(
child: AppText( child: AppText(
TranslationBase.of(context!) TranslationBase.of(context).usageStatus,
.usageStatus,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
) )
@ -330,18 +280,13 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
color: Colors.black, color: Colors.black,
), ),
Padding( Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(horizontal: 8.0),
horizontal: 8.0),
child: ListView.builder( child: ListView.builder(
shrinkWrap: true, shrinkWrap: true,
physics: ScrollPhysics(), physics: ScrollPhysics(),
itemCount: model!.insuranceApprovalInPatient[ itemCount: model
indexInsurance] .insuranceApprovalInPatient[indexInsurance].apporvalDetails!.length,
.apporvalDetails! itemBuilder: (BuildContext context, int index) {
.length,
itemBuilder:
(BuildContext context,
int index) {
return Container( return Container(
child: Column( child: Column(
children: [ children: [
@ -350,45 +295,30 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Expanded( Expanded(
child: Container( child: Container(
child: AppText( child: AppText(
model!.insuranceApprovalInPatient[ model.insuranceApprovalInPatient[indexInsurance]
indexInsurance] .apporvalDetails![index].procedureName ??
?.apporvalDetails![
index]
?.procedureName ??
"", "",
textAlign: textAlign: TextAlign.start,
TextAlign
.start,
), ),
), ),
), ),
Expanded( Expanded(
child: Container( child: Container(
child: AppText( child: AppText(
model!.insuranceApprovalInPatient[ model.insuranceApprovalInPatient[indexInsurance]
indexInsurance] .apporvalDetails![index].status ??
?.apporvalDetails![
index]
?.status ??
"", "",
textAlign: textAlign: TextAlign.center,
TextAlign
.center,
), ),
), ),
), ),
Expanded( Expanded(
child: Container( child: Container(
child: AppText( child: AppText(
model!.insuranceApprovalInPatient[ model.insuranceApprovalInPatient[indexInsurance]
indexInsurance] .apporvalDetails![index].isInvoicedDesc ??
?.apporvalDetails![
index]
?.isInvoicedDesc ??
"", "",
textAlign: textAlign: TextAlign.center,
TextAlign
.center,
), ),
), ),
), ),
@ -437,7 +367,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: [ children: [
AppText( AppText(
TranslationBase.of(context!).approvals22, TranslationBase.of(context).approvals22,
fontSize: 30.0, fontSize: 30.0,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
@ -464,19 +394,10 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: [ children: [
AppText( AppText(
model!.insuranceApproval[ model!.insuranceApproval[indexInsurance].approvalStatusDescption != null
indexInsurance] ? model.insuranceApproval[indexInsurance].approvalStatusDescption ?? ""
.approvalStatusDescption !=
null
? model!.insuranceApproval[
indexInsurance]
.approvalStatusDescption ??
""
: "", : "",
color: model!.insuranceApproval[ color: model.insuranceApproval[indexInsurance].approvalStatusDescption != null
indexInsurance]
.approvalStatusDescption !=
null
? "${model.insuranceApproval[indexInsurance].approvalStatusDescption}" == ? "${model.insuranceApproval[indexInsurance].approvalStatusDescption}" ==
"Approved" "Approved"
? Color(0xff359846) ? Color(0xff359846)
@ -488,9 +409,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: [ children: [
AppText( AppText(
model!.insuranceApproval[indexInsurance] model.insuranceApproval[indexInsurance].doctorName!.toUpperCase(),
.doctorName!
.toUpperCase(),
color: Colors.black, color: Colors.black,
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -498,8 +417,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
], ],
), ),
Padding( Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(horizontal: 8.0),
horizontal: 8.0),
child: Row( child: Row(
children: [ children: [
Column( Column(
@ -508,36 +426,26 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
height: 85.0, height: 85.0,
width: 85.0, width: 85.0,
child: CircleAvatar( child: CircleAvatar(
radius: SizeConfig radius: SizeConfig.imageSizeMultiplier * 12,
.imageSizeMultiplier *
12,
// radius: (52) // radius: (52)
child: ClipRRect( child: ClipRRect(
borderRadius: borderRadius: BorderRadius.circular(50),
BorderRadius.circular(
50),
child: Image.network( child: Image.network(
model!.insuranceApproval[ model.insuranceApproval[indexInsurance].doctorImage!,
indexInsurance]
.doctorImage!,
fit: BoxFit.fill, fit: BoxFit.fill,
width: 700, width: 700,
), ),
), ),
backgroundColor: backgroundColor: Colors.transparent,
Colors.transparent,
), ),
), ),
], ],
), ),
Expanded( Expanded(
child: Padding( child: Padding(
padding: padding: const EdgeInsets.symmetric(horizontal: 8.0),
const EdgeInsets.symmetric(
horizontal: 8.0),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
//mainAxisAlignment: MainAxisAlignment.center, //mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
SizedBox( SizedBox(
@ -546,18 +454,13 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: [ children: [
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).clinic! + ": ",
context)
.clinic! +
": ",
color: Colors.grey[500], color: Colors.grey[500],
fontSize: 14, fontSize: 14,
), ),
Expanded( Expanded(
child: AppText( child: AppText(
model!.insuranceApproval[ model.insuranceApproval[indexInsurance].clinicName,
indexInsurance]
.clinicName,
fontSize: 14, fontSize: 14,
), ),
) )
@ -566,18 +469,12 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).approvalNo! + ": ",
context)
.approvalNo! +
": ",
color: Colors.grey[500], color: Colors.grey[500],
fontSize: 14, fontSize: 14,
), ),
AppText( AppText(
model!.insuranceApproval[ model.insuranceApproval[indexInsurance].approvalNo.toString(),
indexInsurance]
.approvalNo
.toString(),
fontSize: 14, fontSize: 14,
) )
], ],
@ -585,18 +482,12 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).unusedCount! + ": ",
context)
.unusedCount! +
": ",
color: Colors.grey[500], color: Colors.grey[500],
fontSize: 14, fontSize: 14,
), ),
AppText( AppText(
model!.insuranceApproval[ model.insuranceApproval[indexInsurance].unUsedCount.toString(),
indexInsurance]
.unUsedCount
.toString(),
fontSize: 14, fontSize: 14,
) )
], ],
@ -604,10 +495,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).companyName! + ": ",
context)
.companyName! +
": ",
color: Colors.grey[500], color: Colors.grey[500],
), ),
AppText('Sample') AppText('Sample')
@ -616,18 +504,14 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: [ children: [
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).receiptOn! + ": ",
context)
.receiptOn! +
": ",
color: Colors.grey[500], color: Colors.grey[500],
), ),
Expanded( Expanded(
child: AppText( child: AppText(
'${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].rceiptOn!), isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].rceiptOn!), isArabic: projectViewModel.isArabic)}',
color: Colors.black, color: Colors.black,
fontWeight: fontWeight: FontWeight.w600,
FontWeight.w600,
), ),
), ),
], ],
@ -635,21 +519,14 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: [ children: [
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).expiryDate! + ": ",
context)
.expiryDate! +
": ",
color: Colors.grey[500], color: Colors.grey[500],
), ),
if (model!.insuranceApproval[ if (model.insuranceApproval[indexInsurance].expiryDate != null)
indexInsurance]
.expiryDate !=
null)
AppText( AppText(
'${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model!.insuranceApproval[indexInsurance].expiryDate!), isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate!), isArabic: projectViewModel.isArabic)}',
color: Colors.black, color: Colors.black,
fontWeight: fontWeight: FontWeight.w600,
FontWeight.w600,
), ),
], ],
), ),
@ -667,28 +544,24 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
child: Column( child: Column(
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(horizontal: 8.0),
horizontal: 8.0),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
child: AppText( child: AppText(
TranslationBase.of(context!) TranslationBase.of(context).procedure,
.procedure,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
), ),
Expanded( Expanded(
child: AppText( child: AppText(
TranslationBase.of(context!) TranslationBase.of(context).status,
.status,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
), ),
Expanded( Expanded(
child: AppText( child: AppText(
TranslationBase.of(context!) TranslationBase.of(context).usageStatus,
.usageStatus,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
) )
@ -699,18 +572,12 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
color: Colors.black, color: Colors.black,
), ),
Padding( Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(horizontal: 8.0),
horizontal: 8.0),
child: ListView.builder( child: ListView.builder(
shrinkWrap: true, shrinkWrap: true,
physics: ScrollPhysics(), physics: ScrollPhysics(),
itemCount: model!.insuranceApproval[ itemCount: model.insuranceApproval[indexInsurance].apporvalDetails!.length,
indexInsurance] itemBuilder: (BuildContext context, int index) {
.apporvalDetails!
.length,
itemBuilder:
(BuildContext context,
int index) {
return Container( return Container(
child: Column( child: Column(
children: [ children: [
@ -719,45 +586,30 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Expanded( Expanded(
child: Container( child: Container(
child: AppText( child: AppText(
model!.insuranceApproval[ model.insuranceApproval[indexInsurance]
indexInsurance] .apporvalDetails![index].procedureName ??
?.apporvalDetails![
index]
?.procedureName ??
"", "",
textAlign: textAlign: TextAlign.start,
TextAlign
.start,
), ),
), ),
), ),
Expanded( Expanded(
child: Container( child: Container(
child: AppText( child: AppText(
model!.insuranceApproval[ model.insuranceApproval[indexInsurance]
indexInsurance] .apporvalDetails![index].status ??
?.apporvalDetails![
index]
?.status ??
"", "",
textAlign: textAlign: TextAlign.center,
TextAlign
.center,
), ),
), ),
), ),
Expanded( Expanded(
child: Container( child: Container(
child: AppText( child: AppText(
model!.insuranceApproval[ model.insuranceApproval[indexInsurance]
indexInsurance] .apporvalDetails![index].isInvoicedDesc ??
?.apporvalDetails![
index]
?.isInvoicedDesc ??
"", "",
textAlign: textAlign: TextAlign.center,
TextAlign
.center,
), ),
), ),
), ),

@ -44,7 +44,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
child: Center( child: Center(
child: Column( child: Column(
children: [ children: [
BottomSheetTitle(title: TranslationBase.of(context).searchPatient!!), BottomSheetTitle(title: TranslationBase.of(context).searchPatient!),
FractionallySizedBox( FractionallySizedBox(
widthFactor: 0.9, widthFactor: 0.9,
child: Container( child: Container(

@ -37,10 +37,11 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
patientProfileAppBarModel: PatientProfileAppBarModel( patientProfileAppBarModel: PatientProfileAppBarModel(
patient:widget.patient,isInpatient:widget.isInpatient, patient: widget.patient,
isInpatient: widget.isInpatient,
isFromLabResult: true, isFromLabResult: true,
appointmentDate: widget.patientLabOrders.orderDate!,), appointmentDate: widget.patientLabOrders.orderDate!,
),
baseViewModel: model, baseViewModel: model,
body: AppScaffold( body: AppScaffold(
isShowAppBar: false, isShowAppBar: false,
@ -50,9 +51,8 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
LaboratoryResultWidget( LaboratoryResultWidget(
onTap: () async {}, onTap: () async {},
billNo: widget.patientLabOrders.invoiceNo!, billNo: widget.patientLabOrders.invoiceNo!,
details: model.patientLabSpecialResult.length > 0 details:
? model.patientLabSpecialResult[0]!.resultDataHTML model.patientLabSpecialResult.length > 0 ? model.patientLabSpecialResult[0].resultDataHTML : null,
: null,
orderNo: widget.patientLabOrders.orderNo!, orderNo: widget.patientLabOrders.orderNo!,
patientLabOrder: widget.patientLabOrders, patientLabOrder: widget.patientLabOrders,
patient: widget.patient, patient: widget.patient,

@ -59,16 +59,12 @@ class _AddVerifyMedicalReportState extends State<AddVerifyMedicalReport> {
HtmlRichEditor( HtmlRichEditor(
initialText: (medicalReport != null initialText: (medicalReport != null
? medicalReport.reportDataHtml ? medicalReport.reportDataHtml
: model!.medicalReportTemplate! : model.medicalReportTemplate.length > 0
.length! > 0 ? model.medicalReportTemplate[0].templateTextHtml!: ""), ? model.medicalReportTemplate[0].templateTextHtml!
: ""),
hint: "Write the medical report ", hint: "Write the medical report ",
controller: _controller, controller: _controller,
height: height: MediaQuery.of(context).size.height * 0.75,
MediaQuery
.of(context)
.size
.height *
0.75,
), ),
], ],
), ),

@ -77,8 +77,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
baseViewModel: model, baseViewModel: model,
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
patientProfileAppBarModel: PatientProfileAppBarModel( patientProfileAppBarModel: PatientProfileAppBarModel(
patient: patient: patient,
patient,
isInpatient: true, isInpatient: true,
), ),
body: model.patientProgressNoteList == null || model.patientProgressNoteList.length == 0 body: model.patientProgressNoteList == null || model.patientProgressNoteList.length == 0
@ -115,21 +114,21 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
child: CardWithBgWidget( child: CardWithBgWidget(
hasBorder: false, hasBorder: false,
bgColor: model.patientProgressNoteList[index].status == 1 && bgColor: model.patientProgressNoteList[index].status == 1 &&
authenticationViewModel!.doctorProfile!.doctorID != authenticationViewModel.doctorProfile!.doctorID !=
model.patientProgressNoteList[index].createdBy model.patientProgressNoteList[index].createdBy
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: model.patientProgressNoteList[index].status == 4 : model.patientProgressNoteList[index].status == 4
? Colors.red.shade700 ? Colors.red.shade700
: model.patientProgressNoteList[index].status == 2 : model.patientProgressNoteList[index].status == 2
? Colors.green[600]! ? Colors.green[600]!
: Color(0xFFCC9B14)!, : Color(0xFFCC9B14),
widget: Column( widget: Column(
children: [ children: [
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (model.patientProgressNoteList[index].status == 1 && if (model.patientProgressNoteList[index].status == 1 &&
authenticationViewModel!.doctorProfile!.doctorID != authenticationViewModel.doctorProfile!.doctorID !=
model.patientProgressNoteList[index].createdBy) model.patientProgressNoteList[index].createdBy)
AppText( AppText(
TranslationBase.of(context).notePending, TranslationBase.of(context).notePending,
@ -153,7 +152,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
), ),
if (model.patientProgressNoteList[index].status != 2 && if (model.patientProgressNoteList[index].status != 2 &&
model.patientProgressNoteList[index].status != 4 && model.patientProgressNoteList[index].status != 4 &&
authenticationViewModel!.doctorProfile!.doctorID == authenticationViewModel.doctorProfile!.doctorID ==
model.patientProgressNoteList[index].createdBy) model.patientProgressNoteList[index].createdBy)
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -352,9 +351,9 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
? AppDateUtils.getDayMonthYearDateFormatted( ? AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils.getDateTimeFromServerFormat( AppDateUtils.getDateTimeFromServerFormat(
model.patientProgressNoteList[index].createdOn ?? ""), model.patientProgressNoteList[index].createdOn ?? ""),
isArabic: projectViewModel!.isArabic) isArabic: projectViewModel.isArabic)
: AppDateUtils.getDayMonthYearDateFormatted(DateTime.now(), : AppDateUtils.getDayMonthYearDateFormatted(DateTime.now(),
isArabic: projectViewModel!.isArabic), isArabic: projectViewModel.isArabic),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
), ),
@ -445,7 +444,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
padding: EdgeInsets.all(20), padding: EdgeInsets.all(20),
color: Colors.white, color: Colors.white,
child: AppText( child: AppText(
projectViewModel!.isArabic projectViewModel.isArabic
? "هل أنت متأكد أنك تريد تنفيذ $actionName هذا الأمر؟" ? "هل أنت متأكد أنك تريد تنفيذ $actionName هذا الأمر؟"
: 'Are you sure you want $actionName this order?', : 'Are you sure you want $actionName this order?',
fontSize: 15, fontSize: 15,

@ -55,7 +55,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
int _activeTab = 0; int _activeTab = 0;
late StreamController<String> videoCallDurationStreamController; late StreamController<String> videoCallDurationStreamController;
late Stream <String> videoCallDurationStream; //= (() async*{})(); TODO Elham* late Stream<String> videoCallDurationStream; //= (() async*{})(); TODO Elham*
@override @override
void initState() { void initState() {
_tabController = TabController(length: 2, vsync: this); _tabController = TabController(length: 2, vsync: this);
@ -94,7 +94,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
if (routeArgs.containsKey("isFromLiveCare")) { if (routeArgs.containsKey("isFromLiveCare")) {
isFromLiveCare = routeArgs['isFromLiveCare']; isFromLiveCare = routeArgs['isFromLiveCare'];
} }
if(routeArgs.containsKey("isCallFinished")) { if (routeArgs.containsKey("isCallFinished")) {
isCallFinished = routeArgs['isCallFinished']; isCallFinished = routeArgs['isCallFinished'];
} }
if (isInpatient) if (isInpatient)
@ -104,7 +104,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
} }
late StreamSubscription callTimer; late StreamSubscription callTimer;
callConnected(){ callConnected() {
callTimer = CountdownTimer(Duration(minutes: 90), Duration(seconds: 1)).listen(null) callTimer = CountdownTimer(Duration(minutes: 90), Duration(seconds: 1)).listen(null)
..onDone(() { ..onDone(() {
callTimer.cancel(); callTimer.cancel();
@ -115,7 +115,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
}); });
} }
callDisconnected(){ callDisconnected() {
callTimer.cancel(); callTimer.cancel();
videoCallDurationStreamController.sink.add(''); videoCallDurationStreamController.sink.add('');
} }
@ -134,8 +134,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
children: [ children: [
Column( Column(
children: [ children: [
PatientProfileHeaderNewDesignAppBar(patient, arrivalType ?? '0', patientType, PatientProfileHeaderNewDesignAppBar(patient, arrivalType, patientType,
videoCallDurationStream: videoCallDurationStream,isInpatient: isInpatient, videoCallDurationStream: videoCallDurationStream,
isInpatient: isInpatient,
isFromLiveCare: isFromLiveCare, isFromLiveCare: isFromLiveCare,
height: (patient.patientStatusType != null && patient.patientStatusType == 43) height: (patient.patientStatusType != null && patient.patientStatusType == 43)
? 210 ? 210
@ -192,7 +193,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
), ),
if (isFromLiveCare if (isFromLiveCare
? patient.episodeNo != null ? patient.episodeNo != null
:patient.patientStatusType != null && patient.patientStatusType == 43) : patient.patientStatusType != null && patient.patientStatusType == 43)
BaseView<SOAPViewModel>( BaseView<SOAPViewModel>(
onModelReady: (model) async {}, onModelReady: (model) async {},
builder: (_, model, w) => Positioned( builder: (_, model, w) => Positioned(
@ -208,7 +209,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
"${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}", "${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}",
color: isFromLiveCare color: isFromLiveCare
? Colors.red.shade700 ? Colors.red.shade700
:patient.patientStatusType == 43 ? Colors.red.shade700 : Colors.grey.shade700, : patient.patientStatusType == 43
? Colors.red.shade700
: Colors.grey.shade700,
fontColor: Colors.white, fontColor: Colors.white,
vPadding: 8, vPadding: 8,
radius: 30, radius: 30,
@ -223,7 +226,8 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
onPressed: () async { onPressed: () async {
if ((isFromLiveCare && if ((isFromLiveCare &&
patient.appointmentNo != null && patient.appointmentNo != null &&
patient.appointmentNo != 0) ||patient.patientStatusType == 43) { patient.appointmentNo != 0) ||
patient.patientStatusType == 43) {
PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel( PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel(
appointmentNo: patient.appointmentNo, patientMRN: patient.patientMRN); appointmentNo: patient.appointmentNo, patientMRN: patient.patientMRN);
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
@ -239,9 +243,11 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
AppButton( AppButton(
title: title:
"${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
color:isFromLiveCare color: isFromLiveCare
? Colors.red.shade700
: patient.patientStatusType == 43
? Colors.red.shade700 ? Colors.red.shade700
:patient.patientStatusType == 43 ? Colors.red.shade700 : Colors.grey.shade700, : Colors.grey.shade700,
fontColor: Colors.white, fontColor: Colors.white,
vPadding: 8, vPadding: 8,
radius: 30, radius: 30,
@ -255,9 +261,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
), ),
onPressed: () { onPressed: () {
if ((isFromLiveCare && if ((isFromLiveCare &&
patient.appointmentNo != patient.appointmentNo != null &&
null && patient.appointmentNo != 0) ||
patient.appointmentNo != 0) ||patient.patientStatusType == 43) { patient.patientStatusType == 43) {
Navigator.of(context) Navigator.of(context)
.pushNamed(UPDATE_EPISODE, arguments: {'patient': patient}); .pushNamed(UPDATE_EPISODE, arguments: {'patient': patient});
} }
@ -318,15 +324,15 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
patient.episodeNo = 0; patient.episodeNo = 0;
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppPermissionsUtils.requestVideoCallPermission(context: context,onTapGrant: (){ AppPermissionsUtils.requestVideoCallPermission(
locator<VideoCallService>().openVideo(model.startCallRes, patient, callConnected, callDisconnected); context: context,
}, type: ''); onTapGrant: () {
locator<VideoCallService>()
.openVideo(model.startCallRes, patient, callConnected, callDisconnected);
},
type: '');
} }
} }
}, },
), ),
), ),
@ -337,10 +343,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
), ),
], ],
), ),
) : null, )
: null,
), ),
); );
} }
} }

@ -21,12 +21,10 @@ class ReplySummeryOnReferralPatient extends StatefulWidget {
ReplySummeryOnReferralPatient(this.referredPatient, this.doctorReply); ReplySummeryOnReferralPatient(this.referredPatient, this.doctorReply);
@override @override
_ReplySummeryOnReferralPatientState createState() => _ReplySummeryOnReferralPatientState createState() => _ReplySummeryOnReferralPatientState(this.referredPatient);
_ReplySummeryOnReferralPatientState(this.referredPatient);
} }
class _ReplySummeryOnReferralPatientState class _ReplySummeryOnReferralPatientState extends State<ReplySummeryOnReferralPatient> {
extends State<ReplySummeryOnReferralPatient> {
final MyReferralPatientModel referredPatient; final MyReferralPatientModel referredPatient;
_ReplySummeryOnReferralPatientState(this.referredPatient); _ReplySummeryOnReferralPatientState(this.referredPatient);
@ -41,15 +39,12 @@ class _ReplySummeryOnReferralPatientState
body: Container( body: Container(
child: Column( child: Column(
children: [ children: [
Expanded( Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
width: double.infinity, width: double.infinity,
margin: margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
EdgeInsets.symmetric(horizontal: 16, vertical: 16), padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
padding: EdgeInsets.symmetric(
horizontal: 16, vertical: 16),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
@ -70,7 +65,7 @@ class _ReplySummeryOnReferralPatientState
color: Color(0XFF2E303A), color: Color(0XFF2E303A),
), ),
AppText( AppText(
widget.doctorReply ?? '', widget.doctorReply,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 1.8 * SizeConfig.textMultiplier, fontSize: 1.8 * SizeConfig.textMultiplier,
@ -85,8 +80,7 @@ class _ReplySummeryOnReferralPatientState
), ),
), ),
Container( Container(
margin: margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
@ -99,7 +93,9 @@ class _ReplySummeryOnReferralPatientState
color: Colors.red[600], color: Colors.red[600],
), ),
), ),
SizedBox(width: 4,), SizedBox(
width: 4,
),
Expanded( Expanded(
child: AppButton( child: AppButton(
onPressed: () {}, onPressed: () {},

@ -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 StatelessWidget { class ReferredPatientScreen extends StatelessWidget {
PatientType patientType = PatientType.IN_PATIENT; PatientType patientType = PatientType.IN_PATIENT;
@override @override
@ -40,7 +39,8 @@ class ReferredPatientScreen extends StatelessWidget {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}, },
), ),
),model.listMyReferredPatientModel == null || model.listMyReferredPatientModel.length == 0 ),
model.listMyReferredPatientModel == null || model.listMyReferredPatientModel.length == 0
? Center( ? Center(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -65,7 +65,6 @@ class ReferredPatientScreen extends StatelessWidget {
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
...List.generate( ...List.generate(
model.listMyReferredPatientModel.length, model.listMyReferredPatientModel.length,
(index) => InkWell( (index) => InkWell(
@ -102,7 +101,8 @@ class ReferredPatientScreen extends StatelessWidget {
), ),
), ),
], ],
),), ),
),
), ),
), ),
], ],
@ -118,8 +118,7 @@ class PatientTypeRadioWidget extends StatefulWidget {
PatientTypeRadioWidget(this.radioOnChange); PatientTypeRadioWidget(this.radioOnChange);
@override @override
_PatientTypeRadioWidgetState createState() => _PatientTypeRadioWidgetState createState() => _PatientTypeRadioWidgetState(this.radioOnChange);
_PatientTypeRadioWidgetState(this.radioOnChange);
} }
class _PatientTypeRadioWidgetState extends State<PatientTypeRadioWidget> { class _PatientTypeRadioWidgetState extends State<PatientTypeRadioWidget> {
@ -141,7 +140,7 @@ class _PatientTypeRadioWidgetState extends State<PatientTypeRadioWidget> {
onChanged: (PatientType? value) { onChanged: (PatientType? value) {
setState(() { setState(() {
patientType = value!; patientType = value!;
radioOnChange(value!); radioOnChange(value);
}); });
}, },
), ),

@ -198,7 +198,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
), ),
), ),
new TextSpan( new TextSpan(
text: assessment.appointmentId.toString() ?? "", text: assessment.appointmentId.toString(),
style: new TextStyle( style: new TextStyle(
fontSize: 14, fontSize: 14,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),

@ -38,7 +38,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
baseViewModel: mode, baseViewModel: mode,
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
patientProfileAppBarModel: PatientProfileAppBarModel(patient:patient), patientProfileAppBarModel: PatientProfileAppBarModel(patient: patient),
appBarTitle: TranslationBase.of(context).vitalSign!, appBarTitle: TranslationBase.of(context).vitalSign!,
body: mode.patientVitalSignsHistory.length > 0 body: mode.patientVitalSignsHistory.length > 0
? Column( ? Column(
@ -54,7 +54,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
"${patient.firstName ?? patient?.patientDetails?.firstName ?? patient.fullName ?? ''}'s", "${patient.firstName ?? patient.patientDetails?.firstName ?? patient.fullName ?? ''}'s",
fontSize: SizeConfig.textMultiplier * 1.6, fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),

@ -190,9 +190,7 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
appBarTitle: pageTitle ?? "", appBarTitle: pageTitle ?? "",
backgroundColor: Color.fromRGBO(248, 248, 248, 1), backgroundColor: Color.fromRGBO(248, 248, 248, 1),
isShowAppBar: true, isShowAppBar: true,
patientProfileAppBarModel: PatientProfileAppBarModel(patient: patient),
patientProfileAppBarModel: PatientProfileAppBarModel(patient:patient),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -203,7 +201,7 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
"${patient.firstName ?? patient?.patientDetails?.firstName ?? patient.fullName ?? ''}'s", "${patient.firstName ?? patient.patientDetails?.firstName ?? patient.fullName ?? ''}'s",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6, fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

@ -71,10 +71,10 @@ postPrescription(
prescriptionList.add(PrescriptionRequestModel( prescriptionList.add(PrescriptionRequestModel(
covered: true, covered: true,
dose: double.parse(dose ?? "0"), dose: double.parse(dose ?? "0"),
itemId: drugId!.isEmpty ? 1 : int.parse(drugId ?? "0"), itemId: drugId!.isEmpty ? 1 : int.parse(drugId),
doseUnitId: int.parse(doseUnit ?? "1"), doseUnitId: int.parse(doseUnit ?? "1"),
route: route!.isEmpty ? 1 : int.parse(route ?? "1"), route: route!.isEmpty ? 1 : int.parse(route),
frequency: frequency!.isEmpty ? 1 : int.parse(frequency!), frequency: frequency!.isEmpty ? 1 : int.parse(frequency),
remarks: instruction, remarks: instruction,
approvalRequired: true, approvalRequired: true,
icdcode10Id: icdCode.toString(), icdcode10Id: icdCode.toString(),

@ -72,10 +72,10 @@ class _PrescriptionCheckOutScreenState extends State<PrescriptionCheckOutScreen>
prescriptionList.add(PrescriptionRequestModel( prescriptionList.add(PrescriptionRequestModel(
covered: true, covered: true,
dose: double.parse(dose!), dose: double.parse(dose!),
itemId: drugId!.isEmpty ? 1 : int.parse(drugId!), itemId: drugId!.isEmpty ? 1 : int.parse(drugId),
doseUnitId: int.parse(doseUnit!), doseUnitId: int.parse(doseUnit!),
route: route!.isEmpty ? 1 : int.parse(route!), route: route!.isEmpty ? 1 : int.parse(route),
frequency: frequency!.isEmpty ? 1 : int.parse(frequency!), frequency: frequency!.isEmpty ? 1 : int.parse(frequency),
remarks: instruction, remarks: instruction,
approvalRequired: true, approvalRequired: true,
icdcode10Id: icdCode.toString(), icdcode10Id: icdCode.toString(),
@ -85,7 +85,7 @@ class _PrescriptionCheckOutScreenState extends State<PrescriptionCheckOutScreen>
postProcedureReqModel.prescriptionRequestModel = prescriptionList; postProcedureReqModel.prescriptionRequestModel = prescriptionList;
await model!.postPrescription(postProcedureReqModel, patient.patientMRN!); await model!.postPrescription(postProcedureReqModel, patient.patientMRN!);
if (model!.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error); Helpers.showErrorToast(model.error);
} else if (model.state == ViewState.Idle) { } else if (model.state == ViewState.Idle) {
model.getPrescriptions(patient); model.getPrescriptions(patient);
@ -617,7 +617,7 @@ class _PrescriptionCheckOutScreenState extends State<PrescriptionCheckOutScreen>
route: model.itemMedicineListRoute.length == 1 route: model.itemMedicineListRoute.length == 1
? model.itemMedicineListRoute[0]['parameterCode'].toString() ? model.itemMedicineListRoute[0]['parameterCode'].toString()
: route['parameterCode'].toString(), : route['parameterCode'].toString(),
drugId: (widget!.groupProcedures!.aliasN! drugId: (widget.groupProcedures!.aliasN!
.replaceAll("item code ;", "")), .replaceAll("item code ;", "")),
strength: strengthController.text, strength: strengthController.text,
indication: indicationController.text, indication: indicationController.text,

@ -44,8 +44,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100]!, backgroundColor: Colors.grey[100]!,
baseViewModel: model, baseViewModel: model,
patientProfileAppBarModel: PatientProfileAppBarModel( patientProfileAppBarModel: PatientProfileAppBarModel(patient: patient),
patient:patient),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
@ -92,8 +91,8 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
color: Colors.grey, color: Colors.grey,
), ),
Expanded( Expanded(
child: AppText( child:
" " + model.inPatientPrescription[prescriptionIndex].direction! ?? '')), AppText(" " + model.inPatientPrescription[prescriptionIndex].direction!)),
], ],
), ),
Row( Row(
@ -102,8 +101,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
TranslationBase.of(context).route, TranslationBase.of(context).route,
color: Colors.grey, color: Colors.grey,
), ),
AppText( AppText(" " + model.inPatientPrescription[prescriptionIndex].route.toString()),
" " + model.inPatientPrescription[prescriptionIndex].route.toString() ?? ''),
], ],
), ),
Row( Row(
@ -114,7 +112,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
" " + model.inPatientPrescription[prescriptionIndex].refillType! ?? '')), " " + model.inPatientPrescription[prescriptionIndex].refillType!)),
], ],
), ),
Row( Row(
@ -156,9 +154,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
color: Colors.grey, color: Colors.grey,
), ),
AppText(" " + AppText(" " +
model.inPatientPrescription[prescriptionIndex] model.inPatientPrescription[prescriptionIndex].unitofMeasurementDescription!),
.unitofMeasurementDescription! ??
''),
], ],
), ),
Row( Row(
@ -167,8 +163,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
TranslationBase.of(context).dailyDoses, TranslationBase.of(context).dailyDoses,
color: Colors.grey, color: Colors.grey,
), ),
AppText( AppText(" " + model.inPatientPrescription[prescriptionIndex].dose.toString()),
" " + model.inPatientPrescription[prescriptionIndex].dose.toString() ?? ''),
], ],
), ),
Row( Row(
@ -177,10 +172,10 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
TranslationBase.of(context).status, TranslationBase.of(context).status,
color: Colors.grey, color: Colors.grey,
), ),
AppText(" " + AppText(
model.inPatientPrescription[prescriptionIndex].statusDescription " " +
.toString() ?? model.inPatientPrescription[prescriptionIndex].statusDescription.toString(),
''), ),
], ],
), ),
Row( Row(
@ -189,7 +184,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
TranslationBase.of(context).processed, TranslationBase.of(context).processed,
color: Colors.grey, color: Colors.grey,
), ),
AppText(" " + model.inPatientPrescription[prescriptionIndex].processedBy! ?? ''), AppText(" " + model.inPatientPrescription[prescriptionIndex].processedBy!),
], ],
), ),
Row( Row(
@ -198,8 +193,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
TranslationBase.of(context).dailyDoses, TranslationBase.of(context).dailyDoses,
color: Colors.grey, color: Colors.grey,
), ),
AppText( AppText(" " + model.inPatientPrescription[prescriptionIndex].dose.toString()),
" " + model.inPatientPrescription[prescriptionIndex].dose.toString() ?? ''),
], ],
), ),
SizedBox( SizedBox(

@ -37,8 +37,7 @@ class PrescriptionItemsPage extends StatelessWidget {
clinic: prescriptions.clinicDescription!, clinic: prescriptions.clinicDescription!,
branch: prescriptions.name!, branch: prescriptions.name!,
isPrescriptions: true, isPrescriptions: true,
appointmentDate: AppDateUtils.getDateTimeFromServerFormat( appointmentDate: AppDateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate!),
prescriptions.appointmentDate!),
doctorName: prescriptions.doctorName!, doctorName: prescriptions.doctorName!,
profileUrl: prescriptions.doctorImageURL!, profileUrl: prescriptions.doctorImageURL!,
isAppointmentHeader: true, isAppointmentHeader: true,
@ -123,7 +122,7 @@ class PrescriptionItemsPage extends StatelessWidget {
TranslationBase.of(context).frequency, TranslationBase.of(context).frequency,
color: Colors.grey, color: Colors.grey,
), ),
AppText(" " + model.prescriptionReportList[index].frequencyN! ?? ''), AppText(" " + model.prescriptionReportList[index].frequencyN!),
], ],
), ),
Row( Row(
@ -132,8 +131,7 @@ class PrescriptionItemsPage extends StatelessWidget {
TranslationBase.of(context).dailyDoses, TranslationBase.of(context).dailyDoses,
color: Colors.grey, color: Colors.grey,
), ),
AppText( AppText(" " + model.prescriptionReportList[index].doseDailyQuantity),
" " + model.prescriptionReportList[index].doseDailyQuantity ?? ''),
], ],
), ),
Row( Row(
@ -142,8 +140,7 @@ class PrescriptionItemsPage extends StatelessWidget {
TranslationBase.of(context).duration, TranslationBase.of(context).duration,
color: Colors.grey, color: Colors.grey,
), ),
AppText( AppText(" " + model.prescriptionReportList[index].days.toString()),
" " + model.prescriptionReportList[index].days.toString() ?? ''),
], ],
), ),
SizedBox( SizedBox(
@ -237,9 +234,7 @@ class PrescriptionItemsPage extends StatelessWidget {
TranslationBase.of(context).route, TranslationBase.of(context).route,
color: Colors.grey, color: Colors.grey,
), ),
Expanded( Expanded(child: AppText(" " + model.prescriptionReportEnhList[index].route!)),
child:
AppText(" " + model.prescriptionReportEnhList[index].route! ?? '')),
], ],
), ),
Row( Row(
@ -248,7 +243,7 @@ class PrescriptionItemsPage extends StatelessWidget {
TranslationBase.of(context).frequency, TranslationBase.of(context).frequency,
color: Colors.grey, color: Colors.grey,
), ),
AppText(" " + model.prescriptionReportEnhList[index].frequency! ?? ''), AppText(" " + model.prescriptionReportEnhList[index].frequency!),
], ],
), ),
Row( Row(
@ -258,8 +253,7 @@ class PrescriptionItemsPage extends StatelessWidget {
color: Colors.grey, color: Colors.grey,
), ),
AppText(" " + AppText(" " +
model.prescriptionReportEnhList[index].doseDailyQuantity.toString() ?? model.prescriptionReportEnhList[index].doseDailyQuantity.toString()),
''),
], ],
), ),
Row( Row(
@ -268,7 +262,7 @@ class PrescriptionItemsPage extends StatelessWidget {
TranslationBase.of(context).duration, TranslationBase.of(context).duration,
color: Colors.grey, color: Colors.grey,
), ),
AppText(" " + model.prescriptionReportList[index].days.toString() ?? ''), AppText(" " + model.prescriptionReportList[index].days.toString()),
], ],
), ),
SizedBox( SizedBox(

@ -26,7 +26,8 @@ class ProcedureCard extends StatelessWidget {
required this.categoryID, required this.categoryID,
this.categoryName, this.categoryName,
required this.patient, required this.patient,
required this.doctorID, this.isInpatient = false, required this.doctorID,
this.isInpatient = false,
}) : super(key: key); }) : super(key: key);
@override @override
@ -189,11 +190,13 @@ class ProcedureCard extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: AppText( child: AppText(
entityList.remarks.toString() ?? '', entityList.remarks.toString(),
fontSize: 12, fontSize: 12,
), ),
), ),
if ((entityList.categoryID == 2 || entityList.categoryID == 4) && doctorID == entityList.doctorID && !isInpatient) if ((entityList.categoryID == 2 || entityList.categoryID == 4) &&
doctorID == entityList.doctorID &&
!isInpatient)
InkWell( InkWell(
child: Icon(DoctorApp.edit), child: Icon(DoctorApp.edit),
onTap: onTap, onTap: onTap,

@ -11,22 +11,21 @@ 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/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'ProcedureType.dart'; import 'ProcedureType.dart';
class AddFavouriteProcedure extends StatefulWidget { class AddFavouriteProcedure extends StatefulWidget {
final ProcedureViewModel model; final ProcedureViewModel? model;
final PrescriptionViewModel prescriptionModel; final PrescriptionViewModel? prescriptionModel;
final PatiantInformtion patient; final PatiantInformtion patient;
final ProcedureType procedureType; final ProcedureType procedureType;
AddFavouriteProcedure({ AddFavouriteProcedure({
Key? key, Key? key,
required this.model, this.model,
required this.prescriptionModel, this.prescriptionModel,
required this.patient, required this.patient,
required this.procedureType, required this.procedureType,
}); });
@ -41,15 +40,13 @@ class _AddFavouriteProcedureState extends State<AddFavouriteProcedure> {
ProcedureViewModel? model; ProcedureViewModel? model;
PatiantInformtion? patient; PatiantInformtion? patient;
List<ProcedureTempleteDetailsModel> entityList = []; List<ProcedureTempleteDetailsModel> entityList = [];
late ProcedureTempleteDetailsModel groupProcedures; ProcedureTempleteDetailsModel? groupProcedures;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
onModelReady: (model) => onModelReady: (model) => model.getProcedureTemplate(categoryID: widget.procedureType.getCategoryId()),
model.getProcedureTemplate(categoryID: widget.procedureType.getCategoryId()), builder: (BuildContext? context, ProcedureViewModel? model, Widget? child) => AppScaffold(
builder: (BuildContext? context, ProcedureViewModel? model, Widget? child) =>
AppScaffold(
isShowAppBar: false, isShowAppBar: false,
baseViewModel: model, baseViewModel: model,
body: Column( body: Column(
@ -72,8 +69,7 @@ class _AddFavouriteProcedureState extends State<AddFavouriteProcedure> {
entityList.add(history); entityList.add(history);
}); });
}, },
isEntityFavListSelected: (master) => isEntityFavListSelected: (master) => isEntityListSelected(master),
isEntityListSelected(master),
groupProcedures: groupProcedures, groupProcedures: groupProcedures,
selectProcedures: (selectedProcedure) { selectProcedures: (selectedProcedure) {
setState(() { setState(() {
@ -88,12 +84,11 @@ class _AddFavouriteProcedureState extends State<AddFavouriteProcedure> {
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
children: <Widget>[ children: <Widget>[
AppButton( AppButton(
title: widget.procedureType.getAddButtonTitle(context!) ?? title: widget.procedureType.getAddButtonTitle(context),
TranslationBase.of(context!).addSelectedProcedures,
color: Color(0xff359846), color: Color(0xff359846),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
onPressed: () { onPressed: () {
if(widget.procedureType == ProcedureType.PRESCRIPTION){ if (widget.procedureType == ProcedureType.PRESCRIPTION) {
if (groupProcedures == null) { if (groupProcedures == null) {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
'Please Select item ', 'Please Select item ',
@ -114,8 +109,7 @@ class _AddFavouriteProcedureState extends State<AddFavouriteProcedure> {
} else { } else {
if (entityList.isEmpty == true) { if (entityList.isEmpty == true) {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
TranslationBase.of(context!) TranslationBase.of(context).fillTheMandatoryProcedureDetails,
.fillTheMandatoryProcedureDetails,
); );
return; return;
} }
@ -126,8 +120,8 @@ class _AddFavouriteProcedureState extends State<AddFavouriteProcedure> {
items: entityList, items: entityList,
model: model, model: model,
patient: widget.patient, patient: widget.patient,
addButtonTitle: widget.procedureType.getAddButtonTitle(context!), addButtonTitle: widget.procedureType.getAddButtonTitle(context),
toolbarTitle: widget.procedureType.getToolbarLabel(context!), toolbarTitle: widget.procedureType.getToolbarLabel(context),
), ),
), ),
); );

@ -16,23 +16,21 @@ import 'ProcedureType.dart';
import 'entity_list_checkbox_search_widget.dart'; import 'entity_list_checkbox_search_widget.dart';
class AddProcedurePage extends StatefulWidget { class AddProcedurePage extends StatefulWidget {
final ProcedureViewModel model; final ProcedureViewModel? model;
final PatiantInformtion patient; final PatiantInformtion patient;
final ProcedureType procedureType; final ProcedureType procedureType;
const AddProcedurePage( const AddProcedurePage({Key? key, this.model, required this.patient, required this.procedureType}) : super(key: key);
{Key? key, required this.model, required this.patient, required this.procedureType})
: super(key: key);
@override @override
_AddProcedurePageState createState() => _AddProcedurePageState( _AddProcedurePageState createState() =>
patient: patient, model: model, procedureType: this.procedureType); _AddProcedurePageState(patient: patient, model: model, procedureType: this.procedureType);
} }
class _AddProcedurePageState extends State<AddProcedurePage> { class _AddProcedurePageState extends State<AddProcedurePage> {
int? selectedType; int? selectedType;
ProcedureViewModel? model; ProcedureViewModel? model;
PatiantInformtion ?patient; PatiantInformtion? patient;
ProcedureType? procedureType; ProcedureType? procedureType;
_AddProcedurePageState({this.patient, this.model, this.procedureType}); _AddProcedurePageState({this.patient, this.model, this.procedureType});
@ -60,8 +58,7 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
categoryID: procedureType!.getCategoryId(), categoryID: procedureType!.getCategoryId(),
patientId: patient!.patientId); patientId: patient!.patientId);
}, },
builder: (BuildContext? context, ProcedureViewModel? model, Widget? child) => builder: (BuildContext? context, ProcedureViewModel? model, Widget? child) => AppScaffold(
AppScaffold(
isShowAppBar: false, isShowAppBar: false,
body: Column( body: Column(
children: [ children: [
@ -82,29 +79,24 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
Column( Column(
children: [ children: [
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: [ children: [
AppText( AppText(
TranslationBase.of(context!) TranslationBase.of(context).pleaseEnterProcedure,
.pleaseEnterProcedure,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 20, fontSize: 20,
), ),
], ],
), ),
SizedBox( SizedBox(
height: height: MediaQuery.of(context).size.height * 0.02,
MediaQuery.of(context!).size.height * 0.02,
), ),
Row( Row(
children: [ children: [
Container( Container(
width: MediaQuery.of(context!).size.width * width: MediaQuery.of(context).size.width * 0.79,
0.79,
child: AppTextFieldCustom( child: AppTextFieldCustom(
hintText: TranslationBase.of(context!) hintText: TranslationBase.of(context).searchProcedureHere,
.searchProcedureHere,
isTextFieldHasSuffix: false, isTextFieldHasSuffix: false,
maxLines: 1, maxLines: 1,
minLines: 1, minLines: 1,
@ -113,22 +105,17 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
), ),
), ),
SizedBox( SizedBox(
width: MediaQuery.of(context!).size.width * width: MediaQuery.of(context).size.width * 0.02,
0.02,
), ),
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () { onTap: () {
if (procedureName.text.isNotEmpty && if (procedureName.text.isNotEmpty && procedureName.text.length >= 3)
procedureName.text.length >= 3)
model!.getProcedureCategory( model!.getProcedureCategory(
patientId: patient!.patientId, patientId: patient!.patientId, categoryName: procedureName.text);
categoryName:
procedureName.text);
else else
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
TranslationBase.of(context!) TranslationBase.of(context).atLeastThreeCharacters,
.atLeastThreeCharacters,
); );
}, },
child: Icon( child: Icon(
@ -141,16 +128,13 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
), ),
], ],
), ),
if ((procedureType == ProcedureType.PROCEDURE if ((procedureType == ProcedureType.PROCEDURE ? procedureName.text.isNotEmpty : true) &&
? procedureName.text.isNotEmpty
: true) &&
model!.categoriesList.length != 0) model!.categoriesList.length != 0)
NetworkBaseView( NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: EntityListCheckboxSearchWidget( child: EntityListCheckboxSearchWidget(
model: widget.model, model: widget.model!,
masterList: masterList: model.categoriesList[0].entityList!,
model!.categoriesList[0].entityList!,
removeHistory: (item) { removeHistory: (item) {
setState(() { setState(() {
entityList.remove(item); entityList.remove(item);
@ -165,8 +149,7 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
//TODO build your fun herr //TODO build your fun herr
// widget.addSelectedHistories(); // widget.addSelectedHistories();
}, },
isEntityListSelected: (master) => isEntityListSelected: (master) => isEntityListSelected(master),
isEntityListSelected(master),
)), )),
], ],
), ),
@ -181,14 +164,13 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
children: <Widget>[ children: <Widget>[
AppButton( AppButton(
title: procedureType!.getAddButtonTitle(context!), title: procedureType!.getAddButtonTitle(context),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: Color(0xff359846), color: Color(0xff359846),
onPressed: () async { onPressed: () async {
if (entityList.isEmpty == true) { if (entityList.isEmpty == true) {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
TranslationBase.of(context!) TranslationBase.of(context).fillTheMandatoryProcedureDetails,
.fillTheMandatoryProcedureDetails,
); );
return; return;
} }
@ -198,7 +180,7 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
entityList: entityList, entityList: entityList,
patient: patient, patient: patient,
remarks: remarksController.text); remarks: remarksController.text);
Navigator.pop(context!); Navigator.pop(context);
}, },
), ),
], ],
@ -211,8 +193,7 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
} }
bool isEntityListSelected(EntityList masterKey) { bool isEntityListSelected(EntityList masterKey) {
Iterable<EntityList> history = entityList Iterable<EntityList> history = entityList.where((element) => masterKey.procedureId == element.procedureId);
.where((element) => masterKey.procedureId == element.procedureId);
if (history.length > 0) { if (history.length > 0) {
return true; return true;
} }

@ -21,21 +21,16 @@ class BaseAddProcedureTabPage extends StatefulWidget {
final ProcedureType? procedureType; final ProcedureType? procedureType;
const BaseAddProcedureTabPage( const BaseAddProcedureTabPage(
{Key? key, {Key? key, this.model, this.prescriptionModel, this.patient, @required this.procedureType})
this.model,
this.prescriptionModel,
this.patient,
@required this.procedureType})
: super(key: key); : super(key: key);
@override @override
_BaseAddProcedureTabPageState createState() => _BaseAddProcedureTabPageState( _BaseAddProcedureTabPageState createState() =>
patient: patient!, model: model!, procedureType: procedureType!); _BaseAddProcedureTabPageState(patient: patient!, model: model, procedureType: procedureType!);
} }
class _BaseAddProcedureTabPageState extends State<BaseAddProcedureTabPage> class _BaseAddProcedureTabPageState extends State<BaseAddProcedureTabPage> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin { final ProcedureViewModel? model;
final ProcedureViewModel model;
final PatiantInformtion patient; final PatiantInformtion patient;
final ProcedureType procedureType; final ProcedureType procedureType;
@ -68,8 +63,7 @@ class _BaseAddProcedureTabPageState extends State<BaseAddProcedureTabPage>
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
builder: (BuildContext? context, ProcedureViewModel? model, Widget? child) => builder: (BuildContext? context, ProcedureViewModel? model, Widget? child) => AppScaffold(
AppScaffold(
isShowAppBar: false, isShowAppBar: false,
body: NetworkBaseView( body: NetworkBaseView(
baseViewModel: model, baseViewModel: model,
@ -131,8 +125,7 @@ class _BaseAddProcedureTabPageState extends State<BaseAddProcedureTabPage>
tabWidget( tabWidget(
screenSize, screenSize,
_activeTab == 0, _activeTab == 0,
procedureType procedureType.getFavouriteTabName(context),
.getFavouriteTabName(context),
), ),
tabWidget( tabWidget(
screenSize, screenSize,
@ -152,22 +145,15 @@ class _BaseAddProcedureTabPageState extends State<BaseAddProcedureTabPage>
controller: _tabController, controller: _tabController,
children: [ children: [
AddFavouriteProcedure( AddFavouriteProcedure(
model: this.model,
prescriptionModel:
widget.prescriptionModel!,
patient: patient, patient: patient,
procedureType: procedureType, procedureType: procedureType,
), ),
if (widget.procedureType == if (widget.procedureType == ProcedureType.PRESCRIPTION)
ProcedureType.PRESCRIPTION) PrescriptionFormWidget(widget.prescriptionModel!, widget.patient!,
PrescriptionFormWidget( widget.prescriptionModel!.prescriptionList)
widget.prescriptionModel!,
widget.patient!,
widget!.prescriptionModel!
.prescriptionList!)
else else
AddProcedurePage( AddProcedurePage(
model: this.model, model: this.model!,
patient: patient, patient: patient,
procedureType: procedureType, procedureType: procedureType,
), ),
@ -193,10 +179,8 @@ class _BaseAddProcedureTabPageState extends State<BaseAddProcedureTabPage>
child: Container( child: Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration( decoration: TextFieldsUtils.containerBorderDecoration(
isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA), isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA), isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA),
isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA), borderRadius: 4, borderWidth: 0),
borderRadius: 4,
borderWidth: 0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [

@ -69,7 +69,7 @@ class _ProcedureCheckOutScreenState extends State<ProcedureCheckOutScreen> {
width: 5.0, width: 5.0,
), ),
AppText( AppText(
widget.toolbarTitle ?? 'Add Procedure', widget.toolbarTitle,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 20, fontSize: 20,
), ),
@ -196,7 +196,7 @@ class _ProcedureCheckOutScreenState extends State<ProcedureCheckOutScreen> {
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
children: <Widget>[ children: <Widget>[
AppButton( AppButton(
title: widget.addButtonTitle ?? TranslationBase.of(context).addSelectedProcedures, title: widget.addButtonTitle,
color: Color(0xff359846), color: Color(0xff359846),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
onPressed: () async { onPressed: () async {
@ -213,9 +213,7 @@ class _ProcedureCheckOutScreenState extends State<ProcedureCheckOutScreen> {
}); });
Navigator.pop(context); Navigator.pop(context);
await model.preparePostProcedure( await model.preparePostProcedure(
entityList: entityList, entityList: entityList, patient: widget.patient, remarks: remarksController.text);
patient: widget.patient,
remarks: remarksController.text);
Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context); Navigator.pop(context);
}, },

@ -44,7 +44,9 @@ class ProcedureScreen extends StatelessWidget {
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
baseViewModel: model, baseViewModel: model,
patientProfileAppBarModel: PatientProfileAppBarModel( patientProfileAppBarModel: PatientProfileAppBarModel(
patient: patient, isInpatient:isInpatient,), patient: patient,
isInpatient: isInpatient,
),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
@ -173,7 +175,7 @@ class ProcedureScreen extends StatelessWidget {
// 'You Cant Update This Procedure'); // 'You Cant Update This Procedure');
}, },
patient: patient, patient: patient,
doctorID: model!.doctorProfile!.doctorID!, doctorID: model.doctorProfile!.doctorID!,
), ),
), ),
if (model.state == ViewState.ErrorLocal || if (model.state == ViewState.ErrorLocal ||

@ -264,17 +264,16 @@ class Helpers {
} }
static getLabelFromKPI(String kpi) { static getLabelFromKPI(String kpi) {
if (kpi.indexOf("(") > -1 && kpi.indexOf(")")>-1) if (kpi.indexOf("(") > -1 && kpi.indexOf(")") > -1)
return kpi.substring(kpi.indexOf("(") + 1, kpi.indexOf(")")); return kpi.substring(kpi.indexOf("(") + 1, kpi.indexOf(")"));
else else
return ''; return '';
} }
static String timeFrom({Duration? duration}) { static String timeFrom({Duration? duration}) {
String twoDigits(int n) => n.toString().padLeft(2, "0"); String twoDigits(int n) => n.toString().padLeft(2, "0");
String twoDigitMinutes = twoDigits(duration!.inMinutes.remainder(60)); String twoDigitMinutes = twoDigits(duration!.inMinutes.remainder(60));
String twoDigitSeconds = twoDigits(duration!.inSeconds.remainder(60)); String twoDigitSeconds = twoDigits(duration.inSeconds.remainder(60));
return "$twoDigitMinutes:$twoDigitSeconds"; return "$twoDigitMinutes:$twoDigitSeconds";
} }
} }

@ -218,7 +218,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
color: Color(0xFF575757), color: Color(0xFF575757),
fontWeight: FontWeight.bold)), fontWeight: FontWeight.bold)),
new TextSpan( new TextSpan(
text: widget.reply?.remarks?.trim() ?? '', text: widget.reply.remarks?.trim() ?? '',
style: TextStyle(fontFamily: 'Poppins', color: Color(0xFF575757), fontSize: 12)), style: TextStyle(fontFamily: 'Poppins', color: Color(0xFF575757), fontSize: 12)),
], ],
), ),

@ -82,9 +82,9 @@ class MyScheduleWidget extends StatelessWidget {
SizedBox( SizedBox(
height: 5, height: 5,
), ),
if (workingHoursTable!.clinicName != null) if (workingHoursTable.clinicName != null)
AppText( AppText(
workingHoursTable!.clinicName ?? "", workingHoursTable.clinicName ?? "",
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),

@ -1,12 +1,10 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PatientReferralItemWidget extends StatelessWidget { class PatientReferralItemWidget extends StatelessWidget {
final String? referralStatus; final String? referralStatus;
@ -50,8 +48,6 @@ class PatientReferralItemWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
margin: EdgeInsets.only(left: 16.0, right: 16.0, top: 8.0), margin: EdgeInsets.only(left: 16.0, right: 16.0, top: 8.0),
child: Column( child: Column(
@ -76,7 +72,7 @@ class PatientReferralItemWidget extends StatelessWidget {
AppText( AppText(
referralStatus != null ? referralStatus : "", referralStatus != null ? referralStatus : "",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 1.9 * SizeConfig.textMultiplier!, fontSize: 1.9 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: referralStatusCode == 1 color: referralStatusCode == 1
? Color(0xffc4aa54) ? Color(0xffc4aa54)
@ -85,10 +81,10 @@ class PatientReferralItemWidget extends StatelessWidget {
: Colors.red[700], : Colors.red[700],
), ),
AppText( AppText(
referredDate??'', referredDate ?? '',
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 2.0 * SizeConfig.textMultiplier!, fontSize: 2.0 * SizeConfig.textMultiplier,
color: Color(0XFF28353E), color: Color(0XFF28353E),
) )
], ],
@ -98,8 +94,8 @@ class PatientReferralItemWidget extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: AppText( child: AppText(
patientName??'', patientName ?? '',
fontSize: SizeConfig.textMultiplier! * 2.2, fontSize: SizeConfig.textMultiplier * 2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black, color: Colors.black,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -121,10 +117,10 @@ class PatientReferralItemWidget extends StatelessWidget {
width: 4, width: 4,
), ),
AppText( AppText(
referredTime??'', referredTime ?? '',
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 1.8 * SizeConfig.textMultiplier!, fontSize: 1.8 * SizeConfig.textMultiplier,
color: Color(0XFF575757), color: Color(0XFF575757),
) )
], ],
@ -143,14 +139,14 @@ class PatientReferralItemWidget extends StatelessWidget {
TranslationBase.of(context).fileNumber, TranslationBase.of(context).fileNumber,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier!, fontSize: 1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757), color: Color(0XFF575757),
), ),
AppText( AppText(
patientID!, patientID!,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier!, fontSize: 1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A), color: Color(0XFF2E303A),
), ),
], ],
@ -165,7 +161,7 @@ class PatientReferralItemWidget extends StatelessWidget {
: TranslationBase.of(context).refClinic, : TranslationBase.of(context).refClinic,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier!, fontSize: 1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757), color: Color(0XFF575757),
), ),
Expanded( Expanded(
@ -218,7 +214,7 @@ class PatientReferralItemWidget extends StatelessWidget {
TranslationBase.of(context).remarks ?? "" + " : ", TranslationBase.of(context).remarks ?? "" + " : ",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier!, fontSize: 1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757), color: Color(0XFF575757),
), ),
Expanded( Expanded(
@ -226,7 +222,7 @@ class PatientReferralItemWidget extends StatelessWidget {
remark ?? "", remark ?? "",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier!, fontSize: 1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A), color: Color(0XFF2E303A),
maxLines: 1, maxLines: 1,
), ),
@ -281,10 +277,10 @@ class PatientReferralItemWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
referralDoctorName??'', referralDoctorName ?? '',
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontSize: 1.7 * SizeConfig.textMultiplier!, fontSize: 1.7 * SizeConfig.textMultiplier,
color: Colors.black, color: Colors.black,
), ),
if (clinicDescription != null) if (clinicDescription != null)
@ -292,7 +288,7 @@ class PatientReferralItemWidget extends StatelessWidget {
clinicDescription!, clinicDescription!,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 1.4 * SizeConfig.textMultiplier!, fontSize: 1.4 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A), color: Color(0XFF2E303A),
), ),
], ],

@ -35,7 +35,6 @@ class PatientCard extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
width: SizeConfig.screenWidth * 0.9, width: SizeConfig.screenWidth * 0.9,
margin: EdgeInsets.all(6), margin: EdgeInsets.all(6),
@ -58,10 +57,10 @@ class PatientCard extends StatelessWidget {
: isMyPatient : isMyPatient
? Colors.green[500]! ? Colors.green[500]!
: isInpatient : isInpatient
? Colors.white! ? Colors.white
: !isFromSearch : !isFromSearch
? Colors.red[800]! ? Colors.red[800]!
: Colors.white!, : Colors.white,
widget: Container( widget: Container(
color: Colors.white, color: Colors.white,
// padding: EdgeInsets.only(left: 10, right: 0, bottom: 0), // padding: EdgeInsets.only(left: 10, right: 0, bottom: 0),
@ -242,7 +241,6 @@ class PatientCard extends StatelessWidget {
textOverflow: TextOverflow.ellipsis, textOverflow: TextOverflow.ellipsis,
), ),
), ),
if (patientInfo.gender == 1) if (patientInfo.gender == 1)
Icon( Icon(
DoctorApp.male_2, DoctorApp.male_2,
@ -253,9 +251,10 @@ class PatientCard extends StatelessWidget {
DoctorApp.female_1, DoctorApp.female_1,
color: Colors.pink, color: Colors.pink,
), ),
if (isFromLiveCare)
if(isFromLiveCare) ShowTimer(
ShowTimer(patientInfo: patientInfo,), patientInfo: patientInfo,
),
]), ]),
), ),
Row( Row(
@ -462,6 +461,4 @@ class PatientCard extends StatelessWidget {
)), )),
)); ));
} }
} }

@ -46,7 +46,7 @@ class AddNewOrder extends StatelessWidget {
height: 10, height: 10,
), ),
AppText( AppText(
label ?? '', label,
color: Colors.grey[600], color: Colors.grey[600],
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
) )

@ -12,14 +12,12 @@ import 'package:url_launcher/url_launcher.dart';
import 'large_avatar.dart'; import 'large_avatar.dart';
class PatientProfileAppBar extends StatelessWidget class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
with PreferredSizeWidget {
final PatientProfileAppBarModel patientProfileAppBarModel; final PatientProfileAppBarModel patientProfileAppBarModel;
final bool isFromLabResult; final bool isFromLabResult;
final VoidCallback? onPressed; final VoidCallback? onPressed;
PatientProfileAppBar( PatientProfileAppBar({required this.patientProfileAppBarModel, this.isFromLabResult = false, this.onPressed});
{required this.patientProfileAppBarModel, this.isFromLabResult=false, this.onPressed});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -53,23 +51,18 @@ class PatientProfileAppBar extends StatelessWidget
icon: Icon(Icons.arrow_back_ios), icon: Icon(Icons.arrow_back_ios),
color: Color(0xFF2B353E), //Colors.black, color: Color(0xFF2B353E), //Colors.black,
onPressed: () { onPressed: () {
if(onPressed!=null) if (onPressed != null) onPressed!();
onPressed!();
Navigator.pop(context); Navigator.pop(context);
}, },
), ),
Expanded( Expanded(
child: AppText( child: AppText(
patientProfileAppBarModel.patient!.firstName != null patientProfileAppBarModel.patient!.firstName != null
? (Helpers.capitalize( ? (Helpers.capitalize(patientProfileAppBarModel.patient!.firstName) +
patientProfileAppBarModel.patient!.firstName) +
" " + " " +
Helpers.capitalize( Helpers.capitalize(patientProfileAppBarModel.patient!.lastName))
patientProfileAppBarModel.patient!.lastName)) : Helpers.capitalize(patientProfileAppBarModel.patient!.fullName ??
: Helpers.capitalize( patientProfileAppBarModel.patient!.patientDetails!.fullName!),
patientProfileAppBarModel.patient!.fullName ??
patientProfileAppBarModel
.patient!.patientDetails!.fullName!),
fontSize: SizeConfig.textMultiplier * 1.8, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -89,8 +82,7 @@ class PatientProfileAppBar extends StatelessWidget
margin: EdgeInsets.symmetric(horizontal: 4), margin: EdgeInsets.symmetric(horizontal: 4),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
launch("tel://" + launch("tel://" + patientProfileAppBarModel.patient!.mobileNumber!);
patientProfileAppBarModel.patient!.mobileNumber!);
}, },
child: Icon( child: Icon(
Icons.phone, Icons.phone,
@ -107,9 +99,7 @@ class PatientProfileAppBar extends StatelessWidget
width: 60, width: 60,
height: 60, height: 60,
child: Image.asset( child: Image.asset(
gender == 1 gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png',
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
@ -126,9 +116,7 @@ class PatientProfileAppBar extends StatelessWidget
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
patientProfileAppBarModel patientProfileAppBarModel.patient!.patientStatusType == 43
.patient!.patientStatusType ==
43
? AppText( ? AppText(
TranslationBase.of(context).arrivedP, TranslationBase.of(context).arrivedP,
color: Colors.green, color: Colors.green,
@ -143,14 +131,10 @@ class PatientProfileAppBar extends StatelessWidget
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 12, fontSize: 12,
), ),
patientProfileAppBarModel.patient!.startTime != patientProfileAppBarModel.patient!.startTime != null
null
? AppText( ? AppText(
patientProfileAppBarModel patientProfileAppBarModel.patient!.startTime != null
.patient!.startTime != ? patientProfileAppBarModel.patient!.startTime
null
? patientProfileAppBarModel
.patient!.startTime
: '', : '',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 12, fontSize: 12,
@ -165,9 +149,7 @@ class PatientProfileAppBar extends StatelessWidget
children: [ children: [
RichText( RichText(
text: TextSpan( text: TextSpan(
style: TextStyle( style: TextStyle(fontSize: 1.6 * SizeConfig.textMultiplier, color: Colors.black),
fontSize: 1.6 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of(context).fileNumber, text: TranslationBase.of(context).fileNumber,
@ -179,9 +161,7 @@ class PatientProfileAppBar extends StatelessWidget
), ),
), ),
new TextSpan( new TextSpan(
text: patientProfileAppBarModel text: patientProfileAppBarModel.patient!.patientId.toString(),
.patient!.patientId
.toString(),
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -195,27 +175,20 @@ class PatientProfileAppBar extends StatelessWidget
children: [ children: [
AppText( AppText(
patientProfileAppBarModel.patient!.nationalityName ?? patientProfileAppBarModel.patient!.nationalityName ??
patientProfileAppBarModel patientProfileAppBarModel.patient!.nationality ??
.patient!.nationality ?? patientProfileAppBarModel.patient!.nationalityId ??
patientProfileAppBarModel
.patient!.nationalityId ??
'', '',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
patientProfileAppBarModel patientProfileAppBarModel.patient!.nationalityFlagURL != null
.patient!.nationalityFlagURL !=
null
? ClipRRect( ? ClipRRect(
borderRadius: BorderRadius.circular(20.0), borderRadius: BorderRadius.circular(20.0),
child: Image.network( child: Image.network(
patientProfileAppBarModel patientProfileAppBarModel.patient!.nationalityFlagURL!,
.patient!.nationalityFlagURL!,
height: 25, height: 25,
width: 30, width: 30,
errorBuilder: (BuildContext context, errorBuilder: (BuildContext context, Object exception, StackTrace? stackTrace) {
Object exception,
StackTrace? stackTrace) {
return Text('No Image'); return Text('No Image');
}, },
)) ))
@ -253,10 +226,9 @@ class PatientProfileAppBar extends StatelessWidget
), ),
), ),
if (patientProfileAppBarModel.patient!.appointmentDate != if (patientProfileAppBarModel.patient!.appointmentDate != null &&
null && patientProfileAppBarModel.patient!.appointmentDate!.isNotEmpty &&
patientProfileAppBarModel !isFromLabResult)
.patient!.appointmentDate!.isNotEmpty && !isFromLabResult)
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
@ -272,9 +244,7 @@ class PatientProfileAppBar extends StatelessWidget
), ),
AppText( AppText(
AppDateUtils.getDayMonthYearDateFormatted( AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils.convertStringToDate( AppDateUtils.convertStringToDate(patientProfileAppBarModel.patient!.appointmentDate!)),
patientProfileAppBarModel
.patient!.appointmentDate!)),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 12, fontSize: 12,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
@ -305,9 +275,7 @@ class PatientProfileAppBar extends StatelessWidget
new TextSpan( new TextSpan(
text: text:
'${AppDateUtils.getDayMonthYearDateFormatted(patientProfileAppBarModel.appointmentDate!, isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(patientProfileAppBarModel.appointmentDate!, isArabic: projectViewModel.isArabic)}',
style: TextStyle( style: TextStyle(fontWeight: FontWeight.w700, fontSize: 12)),
fontWeight: FontWeight.w700,
fontSize: 12)),
], ],
), ),
), ),
@ -316,10 +284,8 @@ class PatientProfileAppBar extends StatelessWidget
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (patientProfileAppBarModel.patient!.admissionDate != if (patientProfileAppBarModel.patient!.admissionDate != null &&
null && patientProfileAppBarModel.patient!.admissionDate!.isNotEmpty)
patientProfileAppBarModel
.patient!.admissionDate!.isNotEmpty)
Container( Container(
child: RichText( child: RichText(
text: new TextSpan( text: new TextSpan(
@ -331,18 +297,12 @@ class PatientProfileAppBar extends StatelessWidget
), ),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: patientProfileAppBarModel text: patientProfileAppBarModel.patient!.admissionDate == null
.patient!.admissionDate ==
null
? "" ? ""
: TranslationBase.of(context) : TranslationBase.of(context).admissionDate! + " : ",
.admissionDate! +
" : ",
style: TextStyle(fontSize: 10)), style: TextStyle(fontSize: 10)),
new TextSpan( new TextSpan(
text: patientProfileAppBarModel text: patientProfileAppBarModel.patient!.admissionDate == null
.patient!.admissionDate ==
null
? "" ? ""
: "${AppDateUtils.getDayMonthYearDateFormatted((AppDateUtils.getDateTimeFromServerFormat(patientProfileAppBarModel.patient!.admissionDate.toString())))}", : "${AppDateUtils.getDayMonthYearDateFormatted((AppDateUtils.getDateTimeFromServerFormat(patientProfileAppBarModel.patient!.admissionDate.toString())))}",
style: TextStyle( style: TextStyle(
@ -351,20 +311,13 @@ class PatientProfileAppBar extends StatelessWidget
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
)), )),
]))), ]))),
if (patientProfileAppBarModel.patient!.admissionDate != if (patientProfileAppBarModel.patient!.admissionDate != null)
null)
Row( Row(
children: [ children: [
AppText( AppText("${TranslationBase.of(context).numOfDays}: ",
"${TranslationBase.of(context).numOfDays}: ", fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)),
fontSize: 10, if (patientProfileAppBarModel.isDischargedPatient! &&
fontWeight: FontWeight.w600, patientProfileAppBarModel.patient!.dischargeDate != null)
color: Color(0xFF575757)),
if (patientProfileAppBarModel!
.isDischargedPatient! &&
patientProfileAppBarModel
.patient!.dischargeDate !=
null)
AppText( AppText(
"${AppDateUtils.getDateTimeFromServerFormat(patientProfileAppBarModel.patient!.dischargeDate!).difference(AppDateUtils.getDateTimeFromServerFormat(patientProfileAppBarModel.patient!.admissionDate!)).inDays + 1}", "${AppDateUtils.getDateTimeFromServerFormat(patientProfileAppBarModel.patient!.dischargeDate!).difference(AppDateUtils.getDateTimeFromServerFormat(patientProfileAppBarModel.patient!.admissionDate!)).inDays + 1}",
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
@ -394,14 +347,11 @@ class PatientProfileAppBar extends StatelessWidget
width: 30, width: 30,
height: 30, height: 30,
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: projectViewModel.isArabic ? 10 : 85, left: projectViewModel.isArabic ? 10 : 85, right: projectViewModel.isArabic ? 85 : 10, top: 5),
right: projectViewModel.isArabic ? 85 : 10,
top: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border( border: Border(
bottom: bottom: BorderSide(color: Colors.grey[400]!, width: 2.5),
BorderSide(color: Colors.grey[400]!, width: 2.5),
left: BorderSide(color: Colors.grey[400]!, width: 2.5), left: BorderSide(color: Colors.grey[400]!, width: 2.5),
)), )),
), ),
@ -424,19 +374,15 @@ class PatientProfileAppBar extends StatelessWidget
flex: 5, flex: 5,
child: Container( child: Container(
margin: EdgeInsets.all(10), margin: EdgeInsets.all(10),
child: Column( child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText( AppText(
'${TranslationBase.of(context).dr}${patientProfileAppBarModel.doctorName}', '${TranslationBase.of(context).dr}${patientProfileAppBarModel.doctorName}',
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 12, fontSize: 12,
), ),
if (patientProfileAppBarModel.orderNo != if (patientProfileAppBarModel.orderNo != null &&
null && !patientProfileAppBarModel.isPrescriptions!)
!patientProfileAppBarModel
.isPrescriptions!)
Row( Row(
children: <Widget>[ children: <Widget>[
AppText( AppText(
@ -445,17 +391,11 @@ class PatientProfileAppBar extends StatelessWidget
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xFF575757), color: Color(0xFF575757),
), ),
AppText( AppText(patientProfileAppBarModel.orderNo ?? '', fontSize: 12)
patientProfileAppBarModel
.orderNo ??
'',
fontSize: 12)
], ],
), ),
if (patientProfileAppBarModel.invoiceNO != if (patientProfileAppBarModel.invoiceNO != null &&
null && !patientProfileAppBarModel.isPrescriptions!)
!patientProfileAppBarModel!
.isPrescriptions!)
Row( Row(
children: <Widget>[ children: <Widget>[
AppText( AppText(
@ -464,15 +404,10 @@ class PatientProfileAppBar extends StatelessWidget
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xFF575757), color: Color(0xFF575757),
), ),
AppText( AppText(patientProfileAppBarModel.invoiceNO ?? "", fontSize: 12)
patientProfileAppBarModel
.invoiceNO ??
"",
fontSize: 12)
], ],
), ),
if (patientProfileAppBarModel.branch != if (patientProfileAppBarModel.branch != null)
null)
Row( Row(
children: [ children: [
AppText( AppText(
@ -481,15 +416,10 @@ class PatientProfileAppBar extends StatelessWidget
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xFF575757), color: Color(0xFF575757),
), ),
AppText( AppText(patientProfileAppBarModel.branch ?? '', fontSize: 12)
patientProfileAppBarModel
.branch ??
'',
fontSize: 12)
], ],
), ),
if (patientProfileAppBarModel.clinic != if (patientProfileAppBarModel.clinic != null)
null)
Row( Row(
children: [ children: [
AppText( AppText(
@ -498,17 +428,11 @@ class PatientProfileAppBar extends StatelessWidget
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xFF575757), color: Color(0xFF575757),
), ),
AppText( AppText(patientProfileAppBarModel.clinic ?? '', fontSize: 12)
patientProfileAppBarModel
.clinic ??
'',
fontSize: 12)
], ],
), ),
if (patientProfileAppBarModel if (patientProfileAppBarModel.isMedicalFile! &&
.isMedicalFile! && patientProfileAppBarModel.episode != null)
patientProfileAppBarModel.episode !=
null)
Row( Row(
children: [ children: [
AppText( AppText(
@ -517,17 +441,11 @@ class PatientProfileAppBar extends StatelessWidget
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xFF575757), color: Color(0xFF575757),
), ),
AppText( AppText(patientProfileAppBarModel.episode ?? '', fontSize: 12)
patientProfileAppBarModel
.episode ??
'',
fontSize: 12)
], ],
), ),
if (patientProfileAppBarModel if (patientProfileAppBarModel.isMedicalFile! &&
.isMedicalFile! && patientProfileAppBarModel.visitDate != null)
patientProfileAppBarModel.visitDate !=
null)
Row( Row(
children: [ children: [
AppText( AppText(
@ -536,20 +454,14 @@ class PatientProfileAppBar extends StatelessWidget
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xFF575757), color: Color(0xFF575757),
), ),
AppText( AppText(patientProfileAppBarModel.visitDate ?? '', fontSize: 12)
patientProfileAppBarModel
.visitDate ??
'',
fontSize: 12)
], ],
), ),
if (!patientProfileAppBarModel if (!patientProfileAppBarModel.isMedicalFile!)
.isMedicalFile!)
Row( Row(
children: <Widget>[ children: <Widget>[
AppText( AppText(
!patientProfileAppBarModel !patientProfileAppBarModel.isPrescriptions!
.isPrescriptions!
? 'Result Date:' ? 'Result Date:'
: 'Prescriptions Date ', : 'Prescriptions Date ',
fontSize: 10, fontSize: 10,
@ -583,12 +495,16 @@ class PatientProfileAppBar extends StatelessWidget
patientProfileAppBarModel.height == 0 patientProfileAppBarModel.height == 0
? patientProfileAppBarModel.isAppointmentHeader! ? patientProfileAppBarModel.isAppointmentHeader!
? 270 ? 270
: ((patientProfileAppBarModel.patient!.appointmentDate! != null &&patientProfileAppBarModel.patient!.appointmentDate!.isNotEmpty ) : ((patientProfileAppBarModel.patient!.appointmentDate!.isNotEmpty)
? patientProfileAppBarModel.isFromLabResult!?170:150 ? patientProfileAppBarModel.isFromLabResult!
? 170
: 150
: patientProfileAppBarModel.patient!.admissionDate != null : patientProfileAppBarModel.patient!.admissionDate != null
? patientProfileAppBarModel.isFromLabResult!?170:150 ? patientProfileAppBarModel.isFromLabResult!
? 170
: 150
: patientProfileAppBarModel.isDischargedPatient! : patientProfileAppBarModel.isDischargedPatient!
? 240! ? 240
: 130!) : 130)
: patientProfileAppBarModel.height!); : patientProfileAppBarModel.height!);
} }

@ -20,9 +20,9 @@ class StarRating extends StatelessWidget {
5, 5,
(index) => Padding( (index) => Padding(
padding: EdgeInsets.only(right: 1.0), padding: EdgeInsets.only(right: 1.0),
child: Icon((index + 1) <= (totalAverage ?? 0) ? EvaIcons.star : EvaIcons.starOutline, child: Icon((index + 1) <= (totalAverage) ? EvaIcons.star : EvaIcons.starOutline,
size: size, size: size,
color: (index + 1) <= (totalAverage ?? 0) color: (index + 1) <= (totalAverage)
? Color.fromRGBO(255, 186, 0, 1.0) ? Color.fromRGBO(255, 186, 0, 1.0)
: Theme.of(context).hintColor), : Theme.of(context).hintColor),
)), )),

@ -103,7 +103,7 @@ class _SecondaryButtonState extends State<SecondaryButton> with TickerProviderSt
void didUpdateWidget(SecondaryButton oldWidget) { void didUpdateWidget(SecondaryButton oldWidget) {
super.didUpdateWidget(oldWidget); super.didUpdateWidget(oldWidget);
if (oldWidget.disabled != widget.disabled) { if (oldWidget.disabled != widget.disabled) {
bool d = widget.disabled ?? false; bool d = widget.disabled;
if (!d) { if (!d) {
_rippleController.forward(); _rippleController.forward();
} else { } else {

@ -39,7 +39,7 @@ class CardWithBgWidget extends StatelessWidget {
Positioned( Positioned(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: bgColor ?? HexColor('#58434F'), color: bgColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10), topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10), bottomLeft: Radius.circular(10),
@ -55,7 +55,7 @@ class CardWithBgWidget extends StatelessWidget {
Positioned( Positioned(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: bgColor ?? HexColor('#58434F'), color: bgColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10), topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10), bottomLeft: Radius.circular(10),

@ -61,7 +61,7 @@ class DoctorCard extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: AppText( child: AppText(
doctorName ?? "", doctorName,
fontSize: 15, fontSize: 15,
bold: true, bold: true,
)), )),

@ -27,7 +27,7 @@ class ErrorMessage extends StatelessWidget {
padding: const EdgeInsets.only(top: 12, bottom: 12, right: 20, left: 30), padding: const EdgeInsets.only(top: 12, bottom: 12, right: 20, left: 30),
child: Center( child: Center(
child: AppText( child: AppText(
error ?? '', error,
textAlign: TextAlign.center, textAlign: TextAlign.center,
)), )),
), ),

Loading…
Cancel
Save