Merge branch 'update_flutter_3.16.0' of http://34.17.52.180/Haroon6138/doctor_app_flutter into update_3.16.0_CR5439_Pharmacy_Intervention

# Conflicts:
#	lib/config/localized_values.dart
#	lib/screens/home/home_screen.dart
update_3.16.0_CR5439_Pharmacy_Intervention
taha.alam 1 year ago
commit d0debd5d5f

@ -59,7 +59,7 @@ android {
buildTypes { buildTypes {
release { release {
// TODO: Add your own signing config for the release build. // TODO: Add your own signing config for the release build.
signingConfig signingConfigs.debug signingConfig signingConfigs.release
} }
debug { debug {

@ -27,6 +27,19 @@ rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
} }
subprojects {
afterEvaluate { project ->
if (project.plugins.hasPlugin("com.android.application") ||
project.plugins.hasPlugin("com.android.library")) {
project.android {
compileSdkVersion 34
buildToolsVersion "34.0.0"
}
}
}
}
// to here
subprojects { subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }

@ -4,7 +4,7 @@ import OpenTok
// Created by Mohammad Aljammal & Elham Rababah on 24/06/20. // Created by Mohammad Aljammal & Elham Rababah on 24/06/20.
// Copyright © 2020 Cloud. All rights reserved. // Copyright © 2020 Cloud. All rights reserved.
@UIApplicationMain @main
@objc class AppDelegate: FlutterAppDelegate ,ICallProtocol { @objc class AppDelegate: FlutterAppDelegate ,ICallProtocol {
var result: FlutterResult? var result: FlutterResult?

@ -7,9 +7,9 @@ const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/'; const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/';
// const BASE_URL_LIVE_CARE = 'https://livecareuat.hmg.com/'; // const BASE_URL_LIVE_CARE = 'https://livecareuat.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://webservices.hmg.com/'; // const BASE_URL = 'https://webservices.hmg.com/';
@ -407,7 +407,7 @@ const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2; const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z'; const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '9.9.9.9'; const IP_ADDRESS = '9.9.9.9';
const VERSION_ID = 9.3; const VERSION_ID = 9.4;
const CHANNEL = 9; const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt'; const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true; const IS_LOGIN_FOR_DOCTOR_APP = true;

@ -1245,6 +1245,7 @@ const Map<String, Map<String, String>> localizedValues = {
"authorizedBy": {"en": "Authorized By", "ar":"مرخص من قبل"}, "authorizedBy": {"en": "Authorized By", "ar":"مرخص من قبل"},
"dosageDetails": {"en": "Dosage Details", "ar":"تفاصيل الجرعة"}, "dosageDetails": {"en": "Dosage Details", "ar":"تفاصيل الجرعة"},
"accessLevel": {"en": "Access Level", "ar":"مستوى الوصول"}, "accessLevel": {"en": "Access Level", "ar":"مستوى الوصول"},
"stable": {"en": "Stable", "ar":"مستقر"},
"resolved": {"en": "Resolved", "ar":"تم الحل"}, "resolved": {"en": "Resolved", "ar":"تم الحل"},
"diagnosisAlreadyDeleted": {"en": "Diagnosis Already Deleted", "ar":"تم حذف التشخيص بالفعل"}, "diagnosisAlreadyDeleted": {"en": "Diagnosis Already Deleted", "ar":"تم حذف التشخيص بالفعل"},
"diagnosisAlreadyResolved": {"en": "Diagnosis Already Resolved", "ar":"تم حل التشخيص بالفعل"}, "diagnosisAlreadyResolved": {"en": "Diagnosis Already Resolved", "ar":"تم حل التشخيص بالفعل"},

@ -6,6 +6,7 @@ class AuditDiagnosis {
String? deletedBy; String? deletedBy;
String? deletedOn; String? deletedOn;
String? deletedRemarks; String? deletedRemarks;
String? doctorName;
String? diagnosisType; String? diagnosisType;
bool? isEventIdentifiedExternally; bool? isEventIdentifiedExternally;
bool? isResolved; bool? isResolved;
@ -23,6 +24,7 @@ class AuditDiagnosis {
createdOn = json['createdOn']; createdOn = json['createdOn'];
deletedBy = json['deletedBy']; deletedBy = json['deletedBy'];
deletedOn = json['deletedOn']; deletedOn = json['deletedOn'];
doctorName = json['doctorName'];
deletedRemarks = json['deletedRemarks']; deletedRemarks = json['deletedRemarks'];
diagnosisType = json['diagnosisType']; diagnosisType = json['diagnosisType'];
isEventIdentifiedExternally = json['isEventIdentifiedExternally']; isEventIdentifiedExternally = json['isEventIdentifiedExternally'];

@ -37,8 +37,12 @@ class ProjectViewModel with ChangeNotifier {
List<VidaPlusProjectListModel> _vidaPlusProjectListModel = []; List<VidaPlusProjectListModel> _vidaPlusProjectListModel = [];
List<VidaPlusProjectListModel> _vidaPlusInPatientsProjectListModel = [];
List<VidaPlusProjectListModel> get vidaPlusProjectList => _vidaPlusProjectListModel; List<VidaPlusProjectListModel> get vidaPlusProjectList => _vidaPlusProjectListModel;
List<VidaPlusProjectListModel> get vidaPlusInPatientsProjectListModel => _vidaPlusInPatientsProjectListModel;
ProjectViewModel() { ProjectViewModel() {
loadSharedPrefLanguage(); loadSharedPrefLanguage();
@ -63,6 +67,11 @@ class ProjectViewModel with ChangeNotifier {
notifyListeners(); notifyListeners();
} }
setVidaPlusInPatientProjectList(List<VidaPlusProjectListModel> vidaPlusInPatientProjectListModelInput) {
_vidaPlusInPatientsProjectListModel = vidaPlusInPatientProjectListModelInput;
notifyListeners();
}
void loadSharedPrefLanguage() async { void loadSharedPrefLanguage() async {
currentLanguage = await sharedPref.getString(APP_Language); currentLanguage = await sharedPref.getString(APP_Language);
_appLocale = Locale(currentLanguage ?? 'en'); _appLocale = Locale(currentLanguage ?? 'en');
@ -117,6 +126,15 @@ class ProjectViewModel with ChangeNotifier {
}); });
setVidaPlusProjectList(_vidaPlusProjectListModel); setVidaPlusProjectList(_vidaPlusProjectListModel);
} }
_vidaPlusInPatientsProjectListModel.clear();
if (response['ProjectListHMCForDoctorAppInPatient'].length != 0) {
response['ProjectListHMCForDoctorAppInPatient'].forEach((item) {
_vidaPlusInPatientsProjectListModel.add(VidaPlusProjectListModel.fromJson(item));
});
setVidaPlusInPatientProjectList(_vidaPlusInPatientsProjectListModel);
}
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;

@ -125,117 +125,69 @@ class _HomeScreenState extends State<HomeScreen> {
children: [ children: [
Container( Container(
width: MediaQuery.of(context).size.width * .6, width: MediaQuery.of(context).size.width * .6,
child: projectsProvider.doctorClinicsList.length > child: projectsProvider.doctorClinicsList.length > 0
0
? Stack( ? Stack(
children: [ children: [
DropdownButtonHideUnderline( DropdownButtonHideUnderline(
child: DropdownButton( child: DropdownButton(
dropdownColor: Colors.white, dropdownColor: Colors.white,
iconEnabledColor: iconEnabledColor: AppGlobal.appTextColor,
AppGlobal.appTextColor,
icon: Icon(Icons.keyboard_arrow_down), icon: Icon(Icons.keyboard_arrow_down),
isExpanded: true, isExpanded: true,
value: clinicId == null value: clinicId == null ? projectsProvider.doctorClinicsList[0].clinicID : clinicId,
? projectsProvider
.doctorClinicsList[0].clinicID
: clinicId,
iconSize: 25, iconSize: 25,
elevation: 16, elevation: 16,
selectedItemBuilder: selectedItemBuilder: (BuildContext context) {
(BuildContext context) { return projectsProvider.doctorClinicsList.map((item) {
return projectsProvider
.doctorClinicsList
.map((item) {
return Row( return Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.end,
MainAxisAlignment.end,
children: <Widget>[ children: <Widget>[
Column( Column(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.center,
MainAxisAlignment
.center,
children: [ children: [
Container( Container(
padding: padding: EdgeInsets.all(0),
EdgeInsets.all(0), margin: EdgeInsets.all(2),
margin: decoration: new BoxDecoration(
EdgeInsets.all(2), color: AppGlobal.appRedColor,
decoration: borderRadius: BorderRadius.circular(20),
new BoxDecoration(
color: AppGlobal
.appRedColor,
borderRadius:
BorderRadius
.circular(
20),
), ),
constraints: constraints: BoxConstraints(
BoxConstraints(
minWidth: 20, minWidth: 20,
minHeight: 20, minHeight: 20,
), ),
child: Center( child: Center(
child: AppText( child: AppText(
projectsProvider projectsProvider.doctorClinicsList.length.toString(),
.doctorClinicsList color: Colors.white,
.length letterSpacing: -0.72,
.toString(), fontWeight: FontWeight.w600,
color: fontSize: projectsProvider.isArabic ? 10 : 12,
Colors.white, textAlign: TextAlign.center,
letterSpacing:
-0.72,
fontWeight:
FontWeight
.w600,
fontSize:
projectsProvider
.isArabic
? 10
: 12,
textAlign:
TextAlign
.center,
), ),
)), )),
], ],
), ),
AppText( AppText(Utils.convertToTitleCase(item.clinicName),
Utils.convertToTitleCase( fontSize: 14, letterSpacing: -0.96, color: AppGlobal.appTextColor, fontWeight: FontWeight.bold, textAlign: TextAlign.end),
item.clinicName),
fontSize: 14,
letterSpacing: -0.96,
color: AppGlobal
.appTextColor,
fontWeight:
FontWeight.bold,
textAlign: TextAlign.end),
], ],
); );
}).toList(); }).toList();
}, },
onChanged: (newValue) async { onChanged: (newValue) async {
clinicId = newValue; clinicId = newValue;
GifLoaderDialogUtils.showMyDialog( GifLoaderDialogUtils.showMyDialog(context);
context); await model.changeClinic(newValue, authenticationViewModel);
await model.changeClinic(newValue, GifLoaderDialogUtils.hideDialog(context);
authenticationViewModel); if (model.state == ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog( DrAppToastMsg.showErrorToast(model.error);
context);
if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} }
}, },
items: projectsProvider items: projectsProvider.doctorClinicsList.map((item) {
.doctorClinicsList
.map((item) {
return DropdownMenuItem( return DropdownMenuItem(
child: AppText( child: AppText(
Utils.convertToTitleCase( Utils.convertToTitleCase(item.clinicName),
item.clinicName),
fontSize: 14, fontSize: 14,
letterSpacing: -0.96, letterSpacing: -0.96,
color: AppGlobal.appTextColor, color: AppGlobal.appTextColor,
@ -248,8 +200,7 @@ class _HomeScreenState extends State<HomeScreen> {
)), )),
], ],
) )
: AppText( : AppText(TranslationBase.of(context).noClinic),
TranslationBase.of(context).noClinic),
), ),
], ],
), ),
@ -279,22 +230,16 @@ class _HomeScreenState extends State<HomeScreen> {
? FractionallySizedBox( ? FractionallySizedBox(
widthFactor: 0.90, widthFactor: 0.90,
child: Container( child: Container(
child: Column( child: Column(mainAxisAlignment: MainAxisAlignment.start, children: <Widget>[
mainAxisAlignment: SizedBox(
MainAxisAlignment.start, height: 10,
children: <Widget>[ ),
SizedBox( sliderActiveIndex == 1
height: 10, ? DashboardSliderItemWidget(model.dashboardItemsList[4])
), : sliderActiveIndex == 0
sliderActiveIndex == 1 ? DashboardSliderItemWidget(model.dashboardItemsList[3])
? DashboardSliderItemWidget( : DashboardSliderItemWidget(model.dashboardItemsList[6]),
model.dashboardItemsList[4]) ])))
: sliderActiveIndex == 0
? DashboardSliderItemWidget(
model.dashboardItemsList[3])
: DashboardSliderItemWidget(
model.dashboardItemsList[6]),
])))
: SizedBox(), : SizedBox(),
], ],
) )
@ -333,12 +278,9 @@ class _HomeScreenState extends State<HomeScreen> {
: SizeConfig.isHeightLarge : SizeConfig.isHeightLarge
? 15 ? 15
: 13), : 13),
child: ListView( child: ListView(scrollDirection: Axis.horizontal, children: [
scrollDirection: Axis.horizontal, ...homePatientsCardsWidget(model, projectsProvider),
children: [ ])),
...homePatientsCardsWidget(
model, projectsProvider),
])),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
@ -469,25 +411,29 @@ class _HomeScreenState extends State<HomeScreen> {
)); ));
changeColorIndex(); changeColorIndex();
patientCards.add(HomePatientCard( if (!Utils.isVidaPlusInPatientProject(projectsProvider, model.doctorProfile!.projectID!)) {
gradient: backgroundColors[colorIndex], patientCards.add(HomePatientCard(
backgroundIconColor: backgroundIconColors[colorIndex], gradient: backgroundColors[colorIndex],
cardIcon: DoctorApp.inpatient, backgroundIconColor: backgroundIconColors[colorIndex],
textColor: textColors[colorIndex], cardIcon: DoctorApp.inpatient,
text: TranslationBase.of(context).myInPatient, textColor: textColors[colorIndex],
onTap: () { text: TranslationBase
Navigator.push( .of(context)
context, .myInPatient,
FadePage( onTap: () {
page: InPatientScreen( Navigator.push(
specialClinic: model.getSpecialClinic( context,
FadePage(
page: InPatientScreen(
specialClinic: model.getSpecialClinic(
clinicId ?? projectsProvider.doctorClinicsList[0].clinicID), clinicId ?? projectsProvider.doctorClinicsList[0].clinicID),
),
), ),
), );
); },
}, ));
)); changeColorIndex();
changeColorIndex(); }
if (model.isInfectiousDiseaseConsultant) { if (model.isInfectiousDiseaseConsultant) {
patientCards.add(HomePatientCard( patientCards.add(HomePatientCard(

@ -20,7 +20,7 @@ class AuditItem extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
AppText( AppText(
auditDiagnosis.createdBy ?? '', auditDiagnosis.doctorName ?? '',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 12, fontSize: 12,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),

@ -28,7 +28,7 @@ class ListOfExamination extends StatelessWidget {
///todo handle the event as per the actiion ///todo handle the event as per the actiion
/// the action is [SoapDetailItemActions] /// the action is [SoapDetailItemActions]
}, },
status: 'active', status: TranslationBase.of(context).active,
showActions: false, showActions: false,
), ),
separatorBuilder: (_, __) => Divider(), separatorBuilder: (_, __) => Divider(),

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_al
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/allergies/reactions_selection.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/allergies/reactions_selection.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/add_soap_item.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/add_soap_item.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/widgets/SoapDetailItem.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/utils.dart';
@ -102,11 +103,23 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidgetVidaPlus> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( Row(
selectedAllergy.allergyName!, children: [
fontSize: 12, Expanded(
fontWeight: FontWeight.w800, child: AppText(
letterSpacing: -0.48, selectedAllergy.allergyName!,
fontSize: 12,
fontWeight: FontWeight.w800,
letterSpacing: -0.48,
),
),
SizedBox(
width: 8,
),
Status(
status: (selectedAllergy.isActivePatientsAllergy == true ) ? TranslationBase.of(context).active : TranslationBase.of(context).resolved,
)
],
), ),
selectedAllergy.patientsAllergyReactionsDTOs! selectedAllergy.patientsAllergyReactionsDTOs!
.isNotEmpty && .isNotEmpty &&

@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjecti
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/AddChiefComplaints.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/AddChiefComplaints.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/add_soap_item.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/add_soap_item.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/complaint_items.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/complaint_items.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/empty_complaints.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
@ -50,24 +51,27 @@ class UpdateChiefComplaints extends StatelessWidget {
title: TranslationBase.of(context).addChiefComplaint, title: TranslationBase.of(context).addChiefComplaint,
), ),
SizedBox(height: 16), SizedBox(height: 16),
Container(width: MediaQuery.of(context).size.width, if (model.getChiefComplaintListVidaPlus.isEmpty) ...{
height: 40, SizedBox(
child: width: MediaQuery.sizeOf(context).width,
ListView.builder( child: EmptyComplaints(),
shrinkWrap: true, )
scrollDirection: Axis.horizontal, } else ...{
itemCount: model.getChiefComplaintListVidaPlus.length, Container(
itemBuilder: (_, index) => width: MediaQuery.of(context).size.width,
ComplaintItems( height: 40,
complaint: model.getChiefComplaintListVidaPlus[index]!, child: ListView.builder(
onCrossClicked: (complaints) { shrinkWrap: true,
scrollDirection: Axis.horizontal,
}) itemCount:
model.getChiefComplaintListVidaPlus.length,
)), itemBuilder: (_, index) => ComplaintItems(
complaint: model
]), .getChiefComplaintListVidaPlus[index]!,
)); onCrossClicked: (complaints) {}))),
}
]),
));
} }
getChiefComplaints(SOAPViewModel model){ getChiefComplaints(SOAPViewModel model){
model.getChiefComplaint(patientInfo); model.getChiefComplaint(patientInfo);

@ -16,6 +16,7 @@ class EmptyComplaints extends StatelessWidget{
TranslationBase.of(context).noComplaintsFound, TranslationBase.of(context).noComplaintsFound,
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
textAlign: TextAlign.center,
color: Color(0xFFADADAD), color: Color(0xFFADADAD),
) )
], ],

@ -204,16 +204,23 @@ class Status extends StatelessWidget {
borderRadius: BorderRadius.circular(3), borderRadius: BorderRadius.circular(3),
), ),
// color: Color(0xFF359846), // color: Color(0xFF359846),
color: (status.toLowerCase() == 'active' || color: (status.toLowerCase() ==
status.toLowerCase() == 'stable') TranslationBase.of(context).active.toLowerCase() ||
status.toLowerCase() ==
TranslationBase.of(context).stable.toLowerCase())
? Color(0xFFD8E8DB) ? Color(0xFFD8E8DB)
: Color(0x98d02127), : (status.toLowerCase() ==
TranslationBase.of(context).resolved.toLowerCase())
? Colors.lightBlue
: Color(0x98d02127),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6), padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6),
child: AppText( child: AppText(
status, status,
color: (status.toLowerCase() == 'active' || color: (status.toLowerCase() ==
status.toLowerCase() == 'stable') TranslationBase.of(context).active.toLowerCase() ||
status.toLowerCase() ==
TranslationBase.of(context).stable.toLowerCase())
? Color(0xFF359846) ? Color(0xFF359846)
: Colors.white, : Colors.white,
fontSize: 8, fontSize: 8,

@ -39,16 +39,10 @@ class ProcedureScreen extends StatelessWidget {
bool isInpatient = routeArgs['isInpatient']; bool isInpatient = routeArgs['isInpatient'];
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
onModelReady: (model) { onModelReady: (model) {
model.getProcedure( model.getProcedure(mrn: patient.patientId, patientType: patientType, appointmentNo: patient.appointmentNo);
mrn: patient.patientId,
patientType: patientType,
appointmentNo: patient.appointmentNo);
model.isPrincipalCovered(patient: patient); model.isPrincipalCovered(patient: patient);
}, },
builder: (BuildContext context, ProcedureViewModel model, Widget? child) => AppScaffold(
builder: (BuildContext context, ProcedureViewModel model, Widget? child) =>
AppScaffold(
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100]!, backgroundColor: Colors.grey[100]!,
baseViewModel: model, baseViewModel: model,
@ -64,23 +58,16 @@ class ProcedureScreen extends StatelessWidget {
SizedBox( SizedBox(
height: 12, height: 12,
), ),
if ((model.procedureList.length == 0 && if ((model.procedureList.length == 0 && patient.patientStatusType != 43) || patient.patientStatusType != null && patient.patientStatusType == 43)
patient.patientStatusType != 43) ||
patient.patientStatusType != null &&
patient.patientStatusType == 43)
ServiceTitle( ServiceTitle(
title: TranslationBase.of(context).orderTestOr, title: TranslationBase.of(context).orderTestOr,
subTitle: TranslationBase.of(context).procedure, subTitle: TranslationBase.of(context).procedure,
), ),
if ((patient.patientStatusType != null && if ((patient.patientStatusType != null && patient.patientStatusType == 43) || (isFromLiveCare && patient.appointmentNo != null))
patient.patientStatusType == 43) ||
(isFromLiveCare && patient.appointmentNo != null))
AddNewOrder( AddNewOrder(
onTap: () async { onTap: () async {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await model.getProcedureTemplate( await model.getProcedureTemplate(categoryID: ProcedureType.PROCEDURE.getCategoryId(), isLocalBusy: true);
categoryID: ProcedureType.PROCEDURE.getCategoryId(),
isLocalBusy: true);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Navigator.push( Navigator.push(
@ -96,9 +83,17 @@ class ProcedureScreen extends StatelessWidget {
}, },
label: TranslationBase.of(context).addMoreProcedure, label: TranslationBase.of(context).addMoreProcedure,
), ),
!model.isPrincipalCovered_
!model.isPrincipalCovered_ ? Center(child: AppText(TranslationBase.of(context).principalCoveredOrNot,color: Colors.red, textAlign: TextAlign.center, )) :SizedBox(), ? Center(
SizedBox(height: 20,), child: AppText(
TranslationBase.of(context).principalCoveredOrNot,
color: Colors.red,
textAlign: TextAlign.center,
))
: SizedBox(),
SizedBox(
height: 20,
),
if (model.procedureList.isNotEmpty) if (model.procedureList.isNotEmpty)
ListView.builder( ListView.builder(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
@ -107,45 +102,28 @@ class ProcedureScreen extends StatelessWidget {
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
itemBuilder: (BuildContext ctxt, int index) { itemBuilder: (BuildContext ctxt, int index) {
return ProcedureCard( return ProcedureCard(
categoryID: model categoryID: model.procedureList[0].entityList![index].categoryID,
.procedureList[0].entityList![index].categoryID,
entityList: model.procedureList[0].entityList![index], entityList: model.procedureList[0].entityList![index],
onTap: () { onTap: () {
if (model.procedureList[0].entityList![index] if (model.procedureList[0].entityList![index].categoryID == 2 || model.procedureList[0].entityList![index].categoryID == 4)
.categoryID ==
2 ||
model.procedureList[0].entityList![index]
.categoryID ==
4)
updateProcedureForm( updateProcedureForm(
context, context,
model: model, model: model,
patient: patient, patient: patient,
remarks: model.procedureList[0] remarks: model.procedureList[0].entityList![index].remarks!,
.entityList![index].remarks!, orderType: model.procedureList[0].entityList![index].orderType.toString(),
orderType: model.procedureList[0] orderNo: model.procedureList[0].entityList![index].orderNo!,
.entityList![index].orderType procedureName: model.procedureList[0].entityList![index].procedureName!,
.toString(), categoreId: model.procedureList[0].entityList![index].categoryID.toString(),
orderNo: model.procedureList[0] procedureId: model.procedureList[0].entityList![index].procedureId!,
.entityList![index].orderNo!, limetNo: model.procedureList[0].entityList![index].lineItemNo!,
procedureName: model.procedureList[0]
.entityList![index].procedureName!,
categoreId: model.procedureList[0]
.entityList![index].categoryID
.toString(),
procedureId: model.procedureList[0]
.entityList![index].procedureId!,
limetNo: model.procedureList[0]
.entityList![index].lineItemNo!,
); );
}, },
patient: patient, patient: patient,
doctorID: model.doctorProfile?.doctorID, doctorID: model.doctorProfile?.doctorID,
); );
}), }),
if (model.state == ViewState.ErrorLocal || if (model.state == ViewState.ErrorLocal || (model.procedureList.isNotEmpty && model.procedureList[0].entityList!.isEmpty))
(model.procedureList.isNotEmpty &&
model.procedureList[0].entityList!.isEmpty))
Center( Center(
child: ErrorMessage( child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable, error: TranslationBase.of(context).noDataAvailable,

@ -1186,6 +1186,7 @@ class TranslationBase {
localizedValues['onlyOfftimeHoliday']![locale.languageCode]!; localizedValues['onlyOfftimeHoliday']![locale.languageCode]!;
String get active => localizedValues['active']![locale.languageCode]!; String get active => localizedValues['active']![locale.languageCode]!;
String get stable => localizedValues['stable']![locale.languageCode]!;
String get hold => localizedValues['hold']![locale.languageCode]!; String get hold => localizedValues['hold']![locale.languageCode]!;

@ -349,4 +349,14 @@ class Utils {
}); });
return isVidaPlus; return isVidaPlus;
} }
static bool isVidaPlusInPatientProject(ProjectViewModel projectViewModel, int projectID) {
bool isVidaPlusInPatientProject = false;
projectViewModel.vidaPlusInPatientsProjectListModel.forEach((element) {
if (element.projectID == projectID) {
isVidaPlusInPatientProject = true;
}
});
return isVidaPlusInPatientProject;
}
} }

@ -11,7 +11,7 @@ description: A new Flutter project.
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.4.16+1 version: 1.4.17+1
environment: environment:
@ -57,7 +57,7 @@ dependencies:
barcode_scan2: ^4.3.0 barcode_scan2: ^4.3.0
# permissions # permissions
permission_handler: ^11.1.0 permission_handler: ^11.1.0
device_info: ^2.0.2 # device_info: ^2.0.2
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.

Loading…
Cancel
Save