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['EditedBy'] == null) body['EditedBy'] = doctorProfile.doctorID;
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'] == '') {
body['DoctorID'] = null;
}
@ -56,7 +56,7 @@ class BaseAppClient {
}
}
if (body['TokenID'] == null) {
body['TokenID'] = token ?? '';
body['TokenID'] = token;
}
// body['TokenID'] = "@dm!n" ?? '';
String lang = await sharedPref.getString(APP_Language);

@ -46,7 +46,7 @@ class SizeConfig {
if (orientation == Orientation.portrait) {
isPortrait = true;
if (realScreenWidth! < 450) {
if (realScreenWidth < 450) {
isMobilePortrait = true;
}
screenHeight = realScreenHeight;
@ -57,8 +57,8 @@ class SizeConfig {
screenHeight = realScreenWidth;
screenWidth = realScreenHeight;
}
_blockWidth = (screenWidth! / 100);
_blockHeight = (screenHeight! / 100)!;
_blockWidth = (screenWidth / 100);
_blockHeight = (screenHeight / 100);
textMultiplier = _blockHeight;
imageSizeMultiplier = _blockWidth;
@ -83,7 +83,6 @@ class SizeConfig {
return widthMultiplier;
}
static getWidthMultiplier({double? width}) {
// TODO handel LandScape case
if (width != null) {

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

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

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

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

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

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

@ -52,7 +52,7 @@ class ProjectViewModel with ChangeNotifier {
void loadSharedPrefLanguage() async {
currentLanguage = await sharedPref.getString(APP_Language);
_appLocale = Locale(currentLanguage ?? 'en');
_appLocale = Locale(currentLanguage);
_isArabic = currentLanguage != null
? currentLanguage == 'ar'
? true

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

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

@ -18,15 +18,21 @@ class DashboardSliderItemWidget extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.start,
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(
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(
scrollDirection: Axis.horizontal,
children: List.generate(item.summaryoptions!.length, (int index) {

@ -48,7 +48,6 @@ class _HomeScreenState extends State<HomeScreen> {
int colorIndex = 0;
final GlobalKey<ScaffoldState> scaffoldKey = new GlobalKey<ScaffoldState>();
@override
Widget build(BuildContext context) {
ProjectViewModel projectsProvider = Provider.of<ProjectViewModel>(context);
@ -60,7 +59,6 @@ class _HomeScreenState extends State<HomeScreen> {
}
return BaseView<DashboardViewModel>(
onModelReady: (model) async {
await model.setFirebaseNotification(projectsProvider, authenticationViewModel);
await model.getDashboard();
@ -108,13 +106,10 @@ class _HomeScreenState extends State<HomeScreen> {
height: SizeConfig.heightMultiplier * 3,
),
sliderActiveIndex == 1
? DashboardSliderItemWidget(
model.dashboardItemsList[4])
? DashboardSliderItemWidget(model.dashboardItemsList[4])
: sliderActiveIndex == 0
? DashboardSliderItemWidget(
model.dashboardItemsList[3])
: DashboardSliderItemWidget(
model.dashboardItemsList[6]),
? DashboardSliderItemWidget(model.dashboardItemsList[3])
: DashboardSliderItemWidget(model.dashboardItemsList[6]),
],
),
),
@ -131,7 +126,8 @@ class _HomeScreenState extends State<HomeScreen> {
borderRadius: BorderRadius.only(
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),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
@ -154,7 +150,9 @@ class _HomeScreenState extends State<HomeScreen> {
? 16
: SizeConfig.isHeightShort
? 14
: SizeConfig.isHeightLarge?15:13),
: SizeConfig.isHeightLarge
? 15
: 13),
child: ListView(
scrollDirection: Axis.horizontal,
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))
],
),
),
@ -193,7 +196,6 @@ class _HomeScreenState extends State<HomeScreen> {
// List<HomePatientCard> patientCards = [];
//
List<Color> backgroundColors = [];
backgroundColors.add(Color(0xffD02127));
backgroundColors.add(Colors.grey[300]!);
@ -239,8 +241,9 @@ class _HomeScreenState extends State<HomeScreen> {
Navigator.push(
context,
FadePage(
page: PatientInPatientScreen(specialClinic: model!.getSpecialClinic(clinicId??projectsProvider
!.doctorClinicsList[0]!.clinicID!),),
page: PatientInPatientScreen(
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 {
Navigator.of(context).pop();
GifLoaderDialogUtils.showMyDialog(context);
await model.transferToAdmin(widget!.patient!.vcId!, noteController.text);
await model.transferToAdmin(widget.patient.vcId!, noteController.text);
GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);

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

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

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

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

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

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

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

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

@ -134,8 +134,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
children: [
Column(
children: [
PatientProfileHeaderNewDesignAppBar(patient, arrivalType ?? '0', patientType,
videoCallDurationStream: videoCallDurationStream,isInpatient: isInpatient,
PatientProfileHeaderNewDesignAppBar(patient, arrivalType, patientType,
videoCallDurationStream: videoCallDurationStream,
isInpatient: isInpatient,
isFromLiveCare: isFromLiveCare,
height: (patient.patientStatusType != null && patient.patientStatusType == 43)
? 210
@ -208,7 +209,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
"${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}",
color: isFromLiveCare
? Colors.red.shade700
:patient.patientStatusType == 43 ? Colors.red.shade700 : Colors.grey.shade700,
: patient.patientStatusType == 43
? Colors.red.shade700
: Colors.grey.shade700,
fontColor: Colors.white,
vPadding: 8,
radius: 30,
@ -223,7 +226,8 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
onPressed: () async {
if ((isFromLiveCare &&
patient.appointmentNo != null &&
patient.appointmentNo != 0) ||patient.patientStatusType == 43) {
patient.appointmentNo != 0) ||
patient.patientStatusType == 43) {
PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel(
appointmentNo: patient.appointmentNo, patientMRN: patient.patientMRN);
GifLoaderDialogUtils.showMyDialog(context);
@ -241,7 +245,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
"${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
color: isFromLiveCare
? Colors.red.shade700
:patient.patientStatusType == 43 ? Colors.red.shade700 : Colors.grey.shade700,
: patient.patientStatusType == 43
? Colors.red.shade700
: Colors.grey.shade700,
fontColor: Colors.white,
vPadding: 8,
radius: 30,
@ -255,9 +261,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
),
onPressed: () {
if ((isFromLiveCare &&
patient.appointmentNo !=
null &&
patient.appointmentNo != 0) ||patient.patientStatusType == 43) {
patient.appointmentNo != null &&
patient.appointmentNo != 0) ||
patient.patientStatusType == 43) {
Navigator.of(context)
.pushNamed(UPDATE_EPISODE, arguments: {'patient': patient});
}
@ -318,15 +324,15 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
patient.episodeNo = 0;
GifLoaderDialogUtils.hideDialog(context);
AppPermissionsUtils.requestVideoCallPermission(context: context,onTapGrant: (){
locator<VideoCallService>().openVideo(model.startCallRes, patient, callConnected, callDisconnected);
}, type: '');
AppPermissionsUtils.requestVideoCallPermission(
context: context,
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);
@override
_ReplySummeryOnReferralPatientState createState() =>
_ReplySummeryOnReferralPatientState(this.referredPatient);
_ReplySummeryOnReferralPatientState createState() => _ReplySummeryOnReferralPatientState(this.referredPatient);
}
class _ReplySummeryOnReferralPatientState
extends State<ReplySummeryOnReferralPatient> {
class _ReplySummeryOnReferralPatientState extends State<ReplySummeryOnReferralPatient> {
final MyReferralPatientModel referredPatient;
_ReplySummeryOnReferralPatientState(this.referredPatient);
@ -41,15 +39,12 @@ class _ReplySummeryOnReferralPatientState
body: Container(
child: Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Container(
width: double.infinity,
margin:
EdgeInsets.symmetric(horizontal: 16, vertical: 16),
padding: EdgeInsets.symmetric(
horizontal: 16, vertical: 16),
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
@ -70,7 +65,7 @@ class _ReplySummeryOnReferralPatientState
color: Color(0XFF2E303A),
),
AppText(
widget.doctorReply ?? '',
widget.doctorReply,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.8 * SizeConfig.textMultiplier,
@ -85,8 +80,7 @@ class _ReplySummeryOnReferralPatientState
),
),
Container(
margin:
EdgeInsets.symmetric(horizontal: 16, vertical: 16),
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: Row(
children: [
Expanded(
@ -99,7 +93,9 @@ class _ReplySummeryOnReferralPatientState
color: Colors.red[600],
),
),
SizedBox(width: 4,),
SizedBox(
width: 4,
),
Expanded(
child: AppButton(
onPressed: () {},

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

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

@ -54,7 +54,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"${patient.firstName ?? patient?.patientDetails?.firstName ?? patient.fullName ?? ''}'s",
"${patient.firstName ?? patient.patientDetails?.firstName ?? patient.fullName ?? ''}'s",
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),

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

@ -71,10 +71,10 @@ postPrescription(
prescriptionList.add(PrescriptionRequestModel(
covered: true,
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"),
route: route!.isEmpty ? 1 : int.parse(route ?? "1"),
frequency: frequency!.isEmpty ? 1 : int.parse(frequency!),
route: route!.isEmpty ? 1 : int.parse(route),
frequency: frequency!.isEmpty ? 1 : int.parse(frequency),
remarks: instruction,
approvalRequired: true,
icdcode10Id: icdCode.toString(),

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

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

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

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

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

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

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

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

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

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

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

@ -1,12 +1,10 @@
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/util/translations_delegate_base.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:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PatientReferralItemWidget extends StatelessWidget {
final String? referralStatus;
@ -50,8 +48,6 @@ class PatientReferralItemWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
margin: EdgeInsets.only(left: 16.0, right: 16.0, top: 8.0),
child: Column(
@ -76,7 +72,7 @@ class PatientReferralItemWidget extends StatelessWidget {
AppText(
referralStatus != null ? referralStatus : "",
fontFamily: 'Poppins',
fontSize: 1.9 * SizeConfig.textMultiplier!,
fontSize: 1.9 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w700,
color: referralStatusCode == 1
? Color(0xffc4aa54)
@ -88,7 +84,7 @@ class PatientReferralItemWidget extends StatelessWidget {
referredDate ?? '',
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 2.0 * SizeConfig.textMultiplier!,
fontSize: 2.0 * SizeConfig.textMultiplier,
color: Color(0XFF28353E),
)
],
@ -99,7 +95,7 @@ class PatientReferralItemWidget extends StatelessWidget {
Expanded(
child: AppText(
patientName ?? '',
fontSize: SizeConfig.textMultiplier! * 2.2,
fontSize: SizeConfig.textMultiplier * 2.2,
fontWeight: FontWeight.bold,
color: Colors.black,
fontFamily: 'Poppins',
@ -124,7 +120,7 @@ class PatientReferralItemWidget extends StatelessWidget {
referredTime ?? '',
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.8 * SizeConfig.textMultiplier!,
fontSize: 1.8 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
)
],
@ -143,14 +139,14 @@ class PatientReferralItemWidget extends StatelessWidget {
TranslationBase.of(context).fileNumber,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier!,
fontSize: 1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
AppText(
patientID!,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier!,
fontSize: 1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
],
@ -165,7 +161,7 @@ class PatientReferralItemWidget extends StatelessWidget {
: TranslationBase.of(context).refClinic,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier!,
fontSize: 1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
Expanded(
@ -218,7 +214,7 @@ class PatientReferralItemWidget extends StatelessWidget {
TranslationBase.of(context).remarks ?? "" + " : ",
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier!,
fontSize: 1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
Expanded(
@ -226,7 +222,7 @@ class PatientReferralItemWidget extends StatelessWidget {
remark ?? "",
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier!,
fontSize: 1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
maxLines: 1,
),
@ -284,7 +280,7 @@ class PatientReferralItemWidget extends StatelessWidget {
referralDoctorName ?? '',
fontFamily: 'Poppins',
fontWeight: FontWeight.w800,
fontSize: 1.7 * SizeConfig.textMultiplier!,
fontSize: 1.7 * SizeConfig.textMultiplier,
color: Colors.black,
),
if (clinicDescription != null)
@ -292,7 +288,7 @@ class PatientReferralItemWidget extends StatelessWidget {
clinicDescription!,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.4 * SizeConfig.textMultiplier!,
fontSize: 1.4 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
],

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

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

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

@ -20,9 +20,9 @@ class StarRating extends StatelessWidget {
5,
(index) => Padding(
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,
color: (index + 1) <= (totalAverage ?? 0)
color: (index + 1) <= (totalAverage)
? Color.fromRGBO(255, 186, 0, 1.0)
: Theme.of(context).hintColor),
)),

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

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

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

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

Loading…
Cancel
Save