Inpatient Cr Merge

dev_v3.13.6_voipcall
Aamir Muhammad 2 years ago
parent 77651f9652
commit 6f99aca8a5

@ -37,15 +37,11 @@ class ProjectViewModel extends BaseViewModel {
String error = '';
dynamic searchvalue;
bool isLogin = false;
int laserSelectionDuration;
bool isPatientAdmitted = false;
bool patientHasAdmissionRequest = false;
int inPatientProjectID = 0;
GetAdmissionInfoResponseModel getAdmissionInfoResponseModel;
GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel;
double _latitude;
double _longitude;
GetAdmissionInfoResponseModel getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel();
GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel();
RegisterInfoResponse _registerInfo = RegisterInfoResponse();
@ -75,14 +71,14 @@ class ProjectViewModel extends BaseViewModel {
late StreamSubscription subscription;
late double _latitude;
late double _longitude;
late double _latitude = 0.0;
late double _longitude = 0.0;
double get latitude => _latitude;
double get longitude => _longitude;
late int laserSelectionDuration;
late int laserSelectionDuration = 0;
ProjectViewModel() {
try {

@ -71,7 +71,7 @@ class _MyApp extends State<MyApp> {
//1231755
//0567184134 mobile
//2466305493
//246305493
@ -111,7 +111,7 @@ class _MyApp extends State<MyApp> {
// SystemChrome.setPreferredOrientations([
// DeviceOrientation.portraitUp,
// DeviceOrientation.portraitDown,
// DeviceOrientationO.portraitDown,
// ]);
// final themeNotifier = Provider.of<ThemeNotifier>(context);
precacheImage(AssetImage('assets/images/powerd-by.jpg'), context);
@ -158,6 +158,7 @@ class _MyApp extends State<MyApp> {
],
child: Consumer<ProjectViewModel>(
builder: (context, projectProvider, child) => MaterialApp(
builder: (_, mchild) {
return MediaQuery(
data: MediaQuery.of(context).copyWith(

@ -1,24 +1,24 @@
class GetAdmissionInfoResponseModel {
String setupID;
int projectID;
int admissionNo;
String admissionDate;
int admissionRequestNo;
int admissionType;
int patientType;
int patientID;
int clinicID;
int doctorID;
int admittingClinicID;
int admittingDoctorID;
int categoryID;
String roomID;
String bedID;
String? setupID;
int? projectID;
int? admissionNo;
String? admissionDate;
int? admissionRequestNo;
int? admissionType;
int? patientType;
int? patientID;
int? clinicID;
int? doctorID;
int? admittingClinicID;
int? admittingDoctorID;
int? categoryID;
String? roomID;
String? bedID;
dynamic dischargeDate;
int approvalNo;
int status;
String statusDesc;
String statusDescN;
int? approvalNo;
int? status;
String? statusDesc;
String? statusDescN;
GetAdmissionInfoResponseModel(
{this.setupID,

@ -1,16 +1,16 @@
class GetAdmissionRequestInfoResponseModel {
int admissionRequestNo;
String clinicName;
String doctorName;
String expectedAdmissionDate;
List<MedicaLInstructions> medicalInstructions;
int? admissionRequestNo;
String? clinicName;
String? doctorName;
String? expectedAdmissionDate;
List<MedicaLInstructions> ?medicalInstructions;
dynamic medicalInstructionsXML;
String medicalRemarks;
int projectId;
String projectName;
String setupId;
int clinicId;
int doctorId;
String? medicalRemarks;
int? projectId;
String? projectName;
String? setupId;
int? clinicId;
int? doctorId;
GetAdmissionRequestInfoResponseModel(
{this.admissionRequestNo,
@ -36,7 +36,7 @@ class GetAdmissionRequestInfoResponseModel {
if (json['medicaLInstructions'] != null) {
medicalInstructions = <MedicaLInstructions>[];
json['medicaLInstructions'].forEach((v) {
medicalInstructions.add(new MedicaLInstructions.fromJson(v));
medicalInstructions!.add(new MedicaLInstructions.fromJson(v));
});
}
medicalInstructionsXML = json['medicalInstructionsXML'];
@ -55,7 +55,7 @@ class GetAdmissionRequestInfoResponseModel {
data['doctorId'] = this.doctorId;
data['expectedAdmissionDate'] = this.expectedAdmissionDate;
if (this.medicalInstructions != null) {
data['medicaLInstructions'] = this.medicalInstructions.map((v) => v.toJson()).toList();
data['medicaLInstructions'] = this.medicalInstructions!.map((v) => v.toJson()).toList();
}
data['medicalInstructionsXML'] = this.medicalInstructionsXML;
data['medicalRemarks'] = this.medicalRemarks;
@ -67,8 +67,8 @@ class GetAdmissionRequestInfoResponseModel {
}
class MedicaLInstructions {
String description;
int parameterCode;
String? description;
int? parameterCode;
MedicaLInstructions({this.description, this.parameterCode});

@ -1,25 +1,25 @@
class GetAdmittedPatientsResponseModel {
String setupID;
int projectID;
int admissionNo;
String admissionDate;
int patientType;
int patientID;
int clinicID;
int doctorID;
String roomID;
String bedID;
int status;
int admissionStatus;
String createdOn;
String firstName;
String middleName;
String lastName;
String firstNameN;
String middleNameN;
String lastNameN;
int gender;
String dateofBirth;
String? setupID;
int? projectID;
int? admissionNo;
String? admissionDate;
int? patientType;
int? patientID;
int? clinicID;
int? doctorID;
String? roomID;
String? bedID;
int? status;
int? admissionStatus;
String? createdOn;
String? firstName;
String? middleName;
String? lastName;
String? firstNameN;
String? middleNameN;
String? lastNameN;
int? gender;
String? dateofBirth;
dynamic companionFirstName;
dynamic companionMiddleName;
dynamic companionLastName;
@ -28,28 +28,28 @@ class GetAdmittedPatientsResponseModel {
dynamic companionLastNameN;
dynamic companionID;
dynamic companionGender;
bool isHasCompanion;
int buildingID;
int floorID;
int nursingStationID;
int dietType;
String dietTypeDateCahnged;
String dietTypeDescription;
String dietTypeDescriptionN;
bool? isHasCompanion;
int? buildingID;
int? floorID;
int? nursingStationID;
int? dietType;
String? dietTypeDateCahnged;
String? dietTypeDescription;
String? dietTypeDescriptionN;
dynamic allergyDiseaseDateCahnged;
dynamic allergyDiseaseChecked;
dynamic doctorRemarks;
dynamic allergyRemarks;
String age;
String? age;
dynamic allergies;
String companionFullName;
bool dietTypeChanged;
String dietTypeDateCahngedDate;
String genderDescription;
String? companionFullName;
bool? dietTypeChanged;
String? dietTypeDateCahngedDate;
String? genderDescription;
dynamic genderImageUrl;
bool hasAllergy;
bool isNewAdmitted;
String patientFullName;
bool? hasAllergy;
bool? isNewAdmitted;
String? patientFullName;
dynamic allergyRemark;
GetAdmittedPatientsResponseModel(

@ -1,12 +1,12 @@
class GetGeneralInstructions {
int rowID;
int iD;
int projectID;
String text;
String textN;
bool isActive;
int createdBy;
String createdOn;
int? rowID;
int? iD;
int? projectID;
String? text;
String? textN;
bool? isActive;
int? createdBy;
String? createdOn;
dynamic editedBy;
dynamic editedOn;

@ -1,9 +1,9 @@
class InPatientAdvanceHistoryResponseModel {
int advanceNumber;
int errorCode;
String message;
List<ResponseInpatientAdvanceInfo> responseInpatientAdvanceInfo;
int statusCode;
int? advanceNumber;
int? errorCode;
String? message;
List<ResponseInpatientAdvanceInfo>? responseInpatientAdvanceInfo;
int? statusCode;
InPatientAdvanceHistoryResponseModel({this.advanceNumber, this.errorCode, this.message, this.responseInpatientAdvanceInfo, this.statusCode});
@ -14,7 +14,7 @@ class InPatientAdvanceHistoryResponseModel {
if (json['responseInpatientAdvanceInfo'] != null) {
responseInpatientAdvanceInfo = <ResponseInpatientAdvanceInfo>[];
json['responseInpatientAdvanceInfo'].forEach((v) {
responseInpatientAdvanceInfo.add(new ResponseInpatientAdvanceInfo.fromJson(v));
responseInpatientAdvanceInfo!.add(new ResponseInpatientAdvanceInfo.fromJson(v));
});
}
statusCode = json['statusCode'];
@ -26,7 +26,7 @@ class InPatientAdvanceHistoryResponseModel {
data['errorCode'] = this.errorCode;
data['message'] = this.message;
if (this.responseInpatientAdvanceInfo != null) {
data['responseInpatientAdvanceInfo'] = this.responseInpatientAdvanceInfo.map((v) => v.toJson()).toList();
data['responseInpatientAdvanceInfo'] = this.responseInpatientAdvanceInfo!.map((v) => v.toJson()).toList();
}
data['statusCode'] = this.statusCode;
return data;
@ -34,14 +34,14 @@ class InPatientAdvanceHistoryResponseModel {
}
class ResponseInpatientAdvanceInfo {
int admissionNo;
int admissionReqNo;
String createdOn;
int patientId;
int projectId;
num requestedAmount;
String setupId;
int status;
int? admissionNo;
int? admissionReqNo;
String? createdOn;
int? patientId;
int? projectId;
num? requestedAmount;
String? setupId;
int? status;
ResponseInpatientAdvanceInfo({this.admissionNo, this.admissionReqNo, this.createdOn, this.patientId, this.projectId, this.requestedAmount, this.setupId, this.status});

@ -1,9 +1,9 @@
class InPatientAdvanceResponseModel {
int advanceNumber;
int? advanceNumber;
Null errorCode;
String message;
List<ResponseInpatientAdvanceInfo> responseInpatientAdvanceInfo;
int statusCode;
String? message;
List<ResponseInpatientAdvanceInfo>? responseInpatientAdvanceInfo;
int? statusCode;
InPatientAdvanceResponseModel({this.advanceNumber, this.errorCode, this.message, this.responseInpatientAdvanceInfo, this.statusCode});
@ -14,7 +14,7 @@ class InPatientAdvanceResponseModel {
if (json['responseInpatientAdvanceInfo'] != null) {
responseInpatientAdvanceInfo = <ResponseInpatientAdvanceInfo>[];
json['responseInpatientAdvanceInfo'].forEach((v) {
responseInpatientAdvanceInfo.add(new ResponseInpatientAdvanceInfo.fromJson(v));
responseInpatientAdvanceInfo!.add(new ResponseInpatientAdvanceInfo.fromJson(v));
});
}
statusCode = json['statusCode'];
@ -26,7 +26,7 @@ class InPatientAdvanceResponseModel {
data['errorCode'] = this.errorCode;
data['message'] = this.message;
if (this.responseInpatientAdvanceInfo != null) {
data['responseInpatientAdvanceInfo'] = this.responseInpatientAdvanceInfo.map((v) => v.toJson()).toList();
data['responseInpatientAdvanceInfo'] = this.responseInpatientAdvanceInfo!.map((v) => v.toJson()).toList();
}
data['statusCode'] = this.statusCode;
return data;
@ -34,15 +34,15 @@ class InPatientAdvanceResponseModel {
}
class ResponseInpatientAdvanceInfo {
int admissionNo;
int admissionReqNo;
String createdOn;
int patientId;
int projectId;
num requestedAmount;
String setupId;
int status;
int paymentRequestID;
int? admissionNo;
int? admissionReqNo;
String? createdOn;
int? patientId;
int? projectId;
num? requestedAmount;
String? setupId;
int? status;
int? paymentRequestID;
ResponseInpatientAdvanceInfo({this.admissionNo, this.admissionReqNo, this.createdOn, this.patientId, this.projectId, this.requestedAmount, this.setupId, this.status, this.paymentRequestID});

@ -1,18 +1,18 @@
import 'package:flutter/material.dart';
class GetMealItemsScheduleResponseModel {
int itemID;
String description;
String descriptionN;
int? itemID;
String? description;
String? descriptionN;
dynamic comment;
dynamic commentN;
String imageURL;
bool isDefault;
int categoryID;
String categoryDescription;
String categoryDescriptionN;
int scheduleID;
int cal;
String? imageURL;
bool? isDefault;
int? categoryID;
String? categoryDescription;
String? categoryDescriptionN;
int? scheduleID;
int? cal;
GetMealItemsScheduleResponseModel(
{this.itemID,
@ -62,13 +62,13 @@ class GetMealItemsScheduleResponseModel {
}
class GetMealItemsScheduleResponseModelList {
String filterName = "";
String? filterName;
List<GetMealItemsScheduleResponseModel> getMealItemsScheduleResponseModelList = [];
// int selectedItemID = 0;
final ValueNotifier<int> selectedItemID = ValueNotifier(0);
GetMealItemsScheduleResponseModelList({this.filterName, GetMealItemsScheduleResponseModel getMealItemsScheduleResponseModel}) {
getMealItemsScheduleResponseModelList.add(getMealItemsScheduleResponseModel);
GetMealItemsScheduleResponseModelList({this.filterName, GetMealItemsScheduleResponseModel? getMealItemsScheduleResponseModel}) {
getMealItemsScheduleResponseModelList.add(getMealItemsScheduleResponseModel!);
}
}

@ -1,16 +1,16 @@
class GetMealsScheduleResponseModel {
int scheduleID;
int mealID;
String description;
String descriptionN;
int weekID;
String weekDescription;
String weekDescriptionN;
String tAT;
int dietTypeID;
int dayID;
bool isShow;
String tATTime;
int? scheduleID;
int? mealID;
String? description;
String? descriptionN;
int? weekID;
String? weekDescription;
String? weekDescriptionN;
String? tAT;
int? dietTypeID;
int? dayID;
bool? isShow;
String? tATTime;
GetMealsScheduleResponseModel(
{this.scheduleID,

@ -1,15 +1,15 @@
class GetMedicalInstructions {
dynamic propertyChanged;
int admissionRequestNoField;
String clinicNameField;
String doctorNameField;
String expectedAdmissionDateField;
List<MedicaLInstructionsField> medicaLInstructionsField;
int? admissionRequestNoField;
String? clinicNameField;
String? doctorNameField;
String? expectedAdmissionDateField;
List<MedicaLInstructionsField>? medicaLInstructionsField;
dynamic medicalInstructionsXMLField;
String medicalRemarksField;
int projectIdField;
String projectNameField;
String setupIdField;
String? medicalRemarksField;
int? projectIdField;
String? projectNameField;
String? setupIdField;
GetMedicalInstructions(
{this.propertyChanged,
@ -33,7 +33,7 @@ class GetMedicalInstructions {
if (json['medicaLInstructions'] != null) {
medicaLInstructionsField = <MedicaLInstructionsField>[];
json['medicaLInstructions'].forEach((v) {
medicaLInstructionsField.add(new MedicaLInstructionsField.fromJson(v));
medicaLInstructionsField!.add(new MedicaLInstructionsField.fromJson(v));
});
}
medicalInstructionsXMLField = json['medicalInstructionsXMLField'];
@ -51,7 +51,7 @@ class GetMedicalInstructions {
data['doctorNameField'] = this.doctorNameField;
data['expectedAdmissionDateField'] = this.expectedAdmissionDateField;
if (this.medicaLInstructionsField != null) {
data['medicaLInstructionsField'] = this.medicaLInstructionsField.map((v) => v.toJson()).toList();
data['medicaLInstructionsField'] = this.medicaLInstructionsField!.map((v) => v.toJson()).toList();
}
data['medicalInstructionsXMLField'] = this.medicalInstructionsXMLField;
data['medicalRemarksField'] = this.medicalRemarksField;
@ -64,8 +64,8 @@ class GetMedicalInstructions {
class MedicaLInstructionsField {
Null propertyChanged;
String descriptionField;
int parameterCodeField;
String? descriptionField;
int? parameterCodeField;
MedicaLInstructionsField({this.propertyChanged, this.descriptionField, this.parameterCodeField});

@ -14,7 +14,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class BirthNotification extends StatefulWidget {
const BirthNotification({Key key}) : super(key: key);
const BirthNotification({Key? key}) : super(key: key);
@override
State<BirthNotification> createState() => _BirthNotificationState();
@ -29,7 +29,7 @@ class _BirthNotificationState extends State<BirthNotification> {
TextEditingController babyNameAR = new TextEditingController();
TextEditingController contactNumber = new TextEditingController();
ProjectViewModel projectViewModel;
late ProjectViewModel projectViewModel;
List<String> images = [];
@ -37,8 +37,8 @@ class _BirthNotificationState extends State<BirthNotification> {
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
motherMRN.text = projectViewModel.user.patientID.toString();
motherName.text = projectViewModel.user.firstName + " " + projectViewModel.user.lastName;
contactNumber.text = projectViewModel.user.mobileNumber;
motherName.text = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!;
contactNumber.text = projectViewModel.user.mobileNumber!;
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
@ -83,7 +83,7 @@ class _BirthNotificationState extends State<BirthNotification> {
TranslationBase.of(context).scanID,
() {
confirmAttachInsuranceCardImageDialogDialog(
context: context, name: projectViewModel.user.firstName + " " + projectViewModel.user.lastName, fileNo: projectViewModel.user.patientID.toString());
context: context, name: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, fileNo: projectViewModel.user.patientID.toString());
},
color: CustomColors.accentColor,
disabledColor: CustomColors.grey2,
@ -195,7 +195,7 @@ class _BirthNotificationState extends State<BirthNotification> {
GifLoaderDialogUtils.showMyDialog(context);
service
.submitBirthNotification(
projectViewModel.user.patientID, projectViewModel.inPatientProjectID, fatherNameAR.text, fatherName.text, babyNameAR.text, babyName.text, contactNumber.text, images[0], context)
projectViewModel.user.patientID!, projectViewModel.inPatientProjectID, fatherNameAR.text, fatherName.text, babyNameAR.text, babyName.text, contactNumber.text, images[0], context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully);
@ -205,7 +205,7 @@ class _BirthNotificationState extends State<BirthNotification> {
});
}
void confirmAttachInsuranceCardImageDialogDialog({BuildContext context, String name, String fileNo}) {
void confirmAttachInsuranceCardImageDialogDialog({required BuildContext context, required String name, required String fileNo}) {
showDialog(
context: context,
builder: (cxt) => AttachInsuranceCardImageDialog(
@ -221,7 +221,7 @@ class _BirthNotificationState extends State<BirthNotification> {
);
}
Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String prefix, bool isEnable = true, bool hasSelection = false}) {
Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) {
return Container(
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
alignment: Alignment.center,

@ -11,15 +11,15 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class InPatientPaidAdvancePayment extends StatefulWidget {
const InPatientPaidAdvancePayment({Key key}) : super(key: key);
const InPatientPaidAdvancePayment({Key? key}) : super(key: key);
@override
State<InPatientPaidAdvancePayment> createState() => _InPatientPaidAdvancePaymentState();
}
class _InPatientPaidAdvancePaymentState extends State<InPatientPaidAdvancePayment> {
ProjectViewModel projectViewModel;
InPatientAdvanceHistoryResponseModel inPatientAdvanceHistoryResponseModel;
late ProjectViewModel projectViewModel;
InPatientAdvanceHistoryResponseModel inPatientAdvanceHistoryResponseModel = InPatientAdvanceHistoryResponseModel();
@override
void initState() {
@ -36,7 +36,7 @@ class _InPatientPaidAdvancePaymentState extends State<InPatientPaidAdvancePaymen
padding: const EdgeInsets.all(16.0),
child: inPatientAdvanceHistoryResponseModel != null && inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo != null
? ListView.separated(
itemCount: inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo.length,
itemCount: inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo!.length,
itemBuilder: (BuildContext context, int index) {
return Container(
decoration: cardRadius(12),
@ -45,16 +45,16 @@ class _InPatientPaidAdvancePaymentState extends State<InPatientPaidAdvancePaymen
crossAxisAlignment: CrossAxisAlignment.start,
children: [
MyRichText(
TranslationBase.of(context).admissionNo + ": ", inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo[index].admissionNo.toString(), projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).admissionReqNo + ": ", inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo[index].admissionReqNo.toString(),
TranslationBase.of(context).admissionNo + ": ", inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo![index].admissionNo.toString(), projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).admissionReqNo + ": ", inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo![index].admissionReqNo.toString(),
projectViewModel.isArabic),
MyRichText(
TranslationBase.of(context).date + ": ",
DateUtil.formatDateToDate(DateUtil.convertStringToDate(inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo[index].createdOn), false),
DateUtil.formatDateToDate(DateUtil.convertStringToDate(inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo![index].createdOn), false),
projectViewModel.isArabic),
MyRichText(
TranslationBase.of(context).amount_ + ": ", inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo[index].requestedAmount.toString(), projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).status + ": ", getStatus(inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo[index]), projectViewModel.isArabic),
TranslationBase.of(context).amount_ + ": ", inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo![index].requestedAmount.toString(), projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).status + ": ", getStatus(inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo![index]), projectViewModel.isArabic),
],
),
);
@ -89,8 +89,11 @@ class _InPatientPaidAdvancePaymentState extends State<InPatientPaidAdvancePaymen
ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context);
service
.getInPatientAdvancePaymentHistory(projectViewModel.inPatientProjectID, projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionNo : 0,
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo, context)
.getInPatientAdvancePaymentHistory(
projectViewModel.inPatientProjectID,
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionNo! : 0,
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo! : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo!,
context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
inPatientAdvanceHistoryResponseModel = InPatientAdvanceHistoryResponseModel.fromJson(res["responseInpatient"]);

@ -18,14 +18,14 @@ class InPatientPendingAdvancePayment extends StatefulWidget {
InPatientAdvanceResponseModel inPatientAdvanceResponseModel;
bool isHasData;
InPatientPendingAdvancePayment({this.isHasData, this.inPatientAdvanceResponseModel});
InPatientPendingAdvancePayment({required this.isHasData, required this.inPatientAdvanceResponseModel});
@override
State<InPatientPendingAdvancePayment> createState() => _InPatientPendingAdvancePaymentState();
}
class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvancePayment> {
ProjectViewModel projectViewModel;
late ProjectViewModel projectViewModel;
InAppBrowser browser = new InAppBrowser();
var _InAppBrowserOptions = InAppBrowserClassOptions(
@ -58,7 +58,7 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
margin: EdgeInsets.zero,
child: Padding(
padding: const EdgeInsets.all(12.0),
child: widget.isHasData && widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null
child: widget.isHasData && widget.inPatientAdvanceResponseModel!.responseInpatientAdvanceInfo != null
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -85,7 +85,7 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
),
mWidth(3),
Text(
projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
@ -107,7 +107,7 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
),
mWidth(3),
Text(
projectViewModel.user.patientIdentificationNo,
projectViewModel.user.patientIdentificationNo!,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
@ -166,7 +166,7 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
),
),
Text(
TranslationBase.of(context).sar + " ${widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo[0].requestedAmount}",
TranslationBase.of(context).sar + " ${widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].requestedAmount}",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24,
@ -250,19 +250,19 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
void getInPatientPaymentLink(bool isCopy) {
ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context);
int orderID = num.parse(DateTime.now().microsecondsSinceEpoch.toString().substring(7, 15));
int clinicID = projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.clinicID : 17;
int orderID = int.parse(DateTime.now().microsecondsSinceEpoch.toString().substring(7, 15));
int clinicID = projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.clinicID! : 17;
service
.getInPatientPaymentLink(
projectViewModel.inPatientProjectID,
projectViewModel.getAdmissionInfoResponseModel.admissionNo,
projectViewModel.getAdmissionInfoResponseModel.admissionNo!,
orderID,
projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
projectViewModel.user.emailAddress,
widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo[0].requestedAmount,
projectViewModel.user.patientIdentificationNo,
projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
projectViewModel.user.emailAddress!,
widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].requestedAmount!,
projectViewModel.user.patientIdentificationNo!,
clinicID,
widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo[0].paymentRequestID,
widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].paymentRequestID!,
context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);

@ -9,9 +9,9 @@ import 'package:provider/provider.dart';
class GeneralInstructions extends StatelessWidget {
List<GetGeneralInstructions> getGeneralInstructionsList;
ProjectViewModel projectViewModel;
late ProjectViewModel projectViewModel;
GeneralInstructions({@required this.getGeneralInstructionsList});
GeneralInstructions({required this.getGeneralInstructionsList});
@override
Widget build(BuildContext context) {
@ -64,7 +64,7 @@ class GeneralInstructions extends StatelessWidget {
Container(
width: MediaQuery.of(context).size.width * 0.75,
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Text(projectViewModel.isArabic ? getGeneralInstructionsList[index].textN : getGeneralInstructionsList[index].text,
child: Text(projectViewModel.isArabic ? getGeneralInstructionsList[index].textN! : getGeneralInstructionsList[index].text!,
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 14.0,

@ -11,7 +11,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class HelpPRO extends StatefulWidget {
const HelpPRO({Key key}) : super(key: key);
const HelpPRO({Key? key}) : super(key: key);
@override
State<HelpPRO> createState() => _HelpPROState();
@ -19,7 +19,7 @@ class HelpPRO extends StatefulWidget {
class _HelpPROState extends State<HelpPRO> {
TextEditingController assistText = new TextEditingController();
ProjectViewModel projectViewModel;
late ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
@ -69,7 +69,7 @@ class _HelpPROState extends State<HelpPRO> {
);
}
Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String prefix, bool isEnable = true, bool hasSelection = false}) {
Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) {
return Container(
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
alignment: Alignment.center,
@ -155,8 +155,8 @@ class _HelpPROState extends State<HelpPRO> {
ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context);
service
.insertInPatientOrder(projectViewModel.getAdmissionInfoResponseModel, 1, (projectViewModel.user.firstName + " " + projectViewModel.user.lastName),
(projectViewModel.user.firstNameN + " " + projectViewModel.user.lastNameN), projectViewModel.user.mobileNumber, assistText.text, context)
.insertInPatientOrder(projectViewModel.getAdmissionInfoResponseModel, 1, (projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!),
(projectViewModel.user.firstNameN! + " " + projectViewModel.user.lastNameN!), projectViewModel.user.mobileNumber!, assistText.text, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: TranslationBase.of(context).successSendReport);

@ -8,8 +8,8 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class InPatientAdvancePayment extends StatefulWidget {
InPatientAdvanceResponseModel inPatientAdvanceResponseModel;
bool isHasData;
InPatientAdvanceResponseModel? inPatientAdvanceResponseModel;
bool? isHasData;
InPatientAdvancePayment({this.isHasData, this.inPatientAdvanceResponseModel});
@ -18,8 +18,8 @@ class InPatientAdvancePayment extends StatefulWidget {
}
class _InPatientAdvancePaymentState extends State<InPatientAdvancePayment> with SingleTickerProviderStateMixin {
TabController _tabController;
ProjectViewModel projectViewModel;
late TabController _tabController;
late ProjectViewModel projectViewModel;
@override
void initState() {
@ -65,7 +65,7 @@ class _InPatientAdvancePaymentState extends State<InPatientAdvancePayment> with
physics: BouncingScrollPhysics(),
controller: _tabController,
children: [
InPatientPendingAdvancePayment(isHasData: widget.isHasData, inPatientAdvanceResponseModel: widget.inPatientAdvanceResponseModel),
InPatientPendingAdvancePayment(isHasData: widget.isHasData!, inPatientAdvanceResponseModel: widget.inPatientAdvanceResponseModel!),
InPatientPaidAdvancePayment(),
],
),

@ -29,8 +29,8 @@ class InPatientServicesHome extends StatefulWidget {
}
class _InPatientServicesHomeState extends State<InPatientServicesHome> {
ProjectViewModel projectViewModel;
InPatientAdvanceResponseModel inPatientAdvanceResponseModel;
late ProjectViewModel projectViewModel;
InPatientAdvanceResponseModel inPatientAdvanceResponseModel = InPatientAdvanceResponseModel();
bool isReceivePrescriptionEnabled = false;
@override
@ -76,7 +76,7 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
}
List<Widget> getInPatientServicesList(BuildContext context) {
List<Widget> serviceList = List();
List<Widget> serviceList = [];
serviceList.add(
InkWell(
@ -259,8 +259,8 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context);
service
.insertInPatientOrder(projectViewModel.getAdmissionInfoResponseModel, 2, (projectViewModel.user.firstName + " " + projectViewModel.user.lastName),
(projectViewModel.user.firstNameN + " " + projectViewModel.user.lastNameN), projectViewModel.user.mobileNumber, "I need my medicines", context)
.insertInPatientOrder(projectViewModel.getAdmissionInfoResponseModel, 2, (projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!),
(projectViewModel.user.firstNameN! + " " + projectViewModel.user.lastNameN!), projectViewModel.user.mobileNumber!, "I need my medicines", context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
}).catchError((err) {
@ -272,7 +272,7 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
void openBirthNotificationsPage(BuildContext context) {
ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context);
service.getBirthNotification(projectViewModel.user.patientID, context).then((res) {
service.getBirthNotification(projectViewModel.user.patientID!, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) {
print(res['birthNotification']);
@ -330,19 +330,24 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context);
service
.getInPatientAdvancePaymentRequests(projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.projectID : projectViewModel.getAdmissionRequestInfoResponseModel.projectId, projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionNo : 0,
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo, context)
.getInPatientAdvancePaymentRequests(
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.projectID! : projectViewModel.getAdmissionRequestInfoResponseModel.projectId!,
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionNo! : 0,
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo! : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo!,
context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) {
if (res['responseInpatient'] != null) {
inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]);
Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel)));
Navigator.push(context,
FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel)));
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).noData);
}
} else {
Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel)));
Navigator.push(context,
FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel)));
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);

@ -18,15 +18,15 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class MealPlanPage extends StatefulWidget {
const MealPlanPage({Key key}) : super(key: key);
const MealPlanPage({Key? key}) : super(key: key);
@override
State<MealPlanPage> createState() => _MealPlanPageState();
}
class _MealPlanPageState extends State<MealPlanPage> {
ProjectViewModel projectViewModel;
GetAdmittedPatientsResponseModel getAdmittedPatientsResponseModel;
late ProjectViewModel projectViewModel;
GetAdmittedPatientsResponseModel getAdmittedPatientsResponseModel = GetAdmittedPatientsResponseModel();
List<GetMealsScheduleResponseModel> getMealsScheduleResponseModelList = [];
List<GetMealItemsScheduleResponseModel> getMealItemsScheduleResponseModelBreakfast = [];
@ -69,13 +69,13 @@ class _MealPlanPageState extends State<MealPlanPage> {
? Column(
children: [
Container(
decoration: containerRadius((getMealsScheduleResponseModelList[0].isShow) ? Colors.white : Colors.grey[300], 12),
decoration: containerRadius((getMealsScheduleResponseModelList[0].isShow)! ? Colors.white : Colors.grey[300]!, 12),
child: AppExpandableNotifier(
title: "Breakfast TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[0].tATTime),
title: "Breakfast TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[0].tATTime!),
isTitleSingleLine: false,
widgetColor: Colors.transparent,
isExpand: getMealsScheduleResponseModelList[0].isShow,
isDisabled: !getMealsScheduleResponseModelList[0].isShow,
isExpand: getMealsScheduleResponseModelList[0].isShow!,
isDisabled: !getMealsScheduleResponseModelList[0].isShow!,
bodyWidget: Column(
children: [
getDivider(),
@ -88,7 +88,7 @@ class _MealPlanPageState extends State<MealPlanPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(_getMealItemsScheduleResponseModelBreakfast[index].filterName,
Text(_getMealItemsScheduleResponseModelBreakfast[index].filterName!,
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0, letterSpacing: -0.64, color: CustomColors.darkGrey)),
SizedBox(
height: 12.0,
@ -110,7 +110,7 @@ class _MealPlanPageState extends State<MealPlanPage> {
groupValue: _getMealItemsScheduleResponseModelBreakfast[index].selectedItemID.value,
activeColor: Colors.red[800],
onChanged: (value) {
_getMealItemsScheduleResponseModelBreakfast[index].selectedItemID.value = value;
_getMealItemsScheduleResponseModelBreakfast[index].selectedItemID.value = value!;
},
);
}),
@ -131,8 +131,8 @@ class _MealPlanPageState extends State<MealPlanPage> {
MyRichText(
"",
projectViewModel.isArabic
? _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].descriptionN
: _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].description,
? _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].descriptionN!
: _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].description!,
projectViewModel.isArabic),
],
),
@ -173,13 +173,13 @@ class _MealPlanPageState extends State<MealPlanPage> {
),
mHeight(21),
Container(
decoration: containerRadius(getMealsScheduleResponseModelList[1].isShow ? Colors.white : Colors.grey[300], 12),
decoration: containerRadius(getMealsScheduleResponseModelList[1].isShow! ? Colors.white : Colors.grey[300]!, 12),
child: AppExpandableNotifier(
title: "Lunch TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[1].tATTime),
title: "Lunch TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[1].tATTime!),
isTitleSingleLine: false,
widgetColor: Colors.transparent,
isExpand: getMealsScheduleResponseModelList[1].isShow,
isDisabled: !getMealsScheduleResponseModelList[1].isShow,
isExpand: getMealsScheduleResponseModelList[1].isShow!,
isDisabled: !getMealsScheduleResponseModelList[1].isShow!,
bodyWidget: Column(
children: [
getDivider(),
@ -192,7 +192,7 @@ class _MealPlanPageState extends State<MealPlanPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(_getMealItemsScheduleResponseModelLunch[index].filterName,
Text(_getMealItemsScheduleResponseModelLunch[index].filterName!,
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0, letterSpacing: -0.64, color: CustomColors.darkGrey)),
SizedBox(
height: 12.0,
@ -214,7 +214,7 @@ class _MealPlanPageState extends State<MealPlanPage> {
groupValue: _getMealItemsScheduleResponseModelLunch[index].selectedItemID.value,
activeColor: Colors.red[800],
onChanged: (value) {
_getMealItemsScheduleResponseModelLunch[index].selectedItemID.value = value;
_getMealItemsScheduleResponseModelLunch[index].selectedItemID.value = value!;
},
);
}),
@ -235,8 +235,8 @@ class _MealPlanPageState extends State<MealPlanPage> {
MyRichText(
"",
projectViewModel.isArabic
? _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].descriptionN
: _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].description,
? _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].descriptionN!
: _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].description!,
projectViewModel.isArabic),
],
),
@ -277,13 +277,13 @@ class _MealPlanPageState extends State<MealPlanPage> {
),
mHeight(21),
Container(
decoration: containerRadius(getMealsScheduleResponseModelList[2].isShow ? Colors.white : Colors.grey[300], 12),
decoration: containerRadius(getMealsScheduleResponseModelList[2].isShow! ? Colors.white : Colors.grey[300]!, 12),
child: AppExpandableNotifier(
title: "Dinner TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[2].tATTime),
title: "Dinner TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[2].tATTime!),
isTitleSingleLine: false,
widgetColor: Colors.transparent,
isExpand: getMealsScheduleResponseModelList[2].isShow,
isDisabled: !getMealsScheduleResponseModelList[2].isShow,
isExpand: getMealsScheduleResponseModelList[2].isShow!,
isDisabled: !getMealsScheduleResponseModelList[2].isShow!,
bodyWidget: Column(
children: [
getDivider(),
@ -296,7 +296,7 @@ class _MealPlanPageState extends State<MealPlanPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(_getMealItemsScheduleResponseModelDinner[index].filterName,
Text(_getMealItemsScheduleResponseModelDinner[index].filterName!,
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0, letterSpacing: -0.64, color: CustomColors.darkGrey)),
SizedBox(
height: 12.0,
@ -318,7 +318,7 @@ class _MealPlanPageState extends State<MealPlanPage> {
groupValue: _getMealItemsScheduleResponseModelDinner[index].selectedItemID.value,
activeColor: Colors.red[800],
onChanged: (value) {
_getMealItemsScheduleResponseModelDinner[index].selectedItemID.value = value;
_getMealItemsScheduleResponseModelDinner[index].selectedItemID.value = value!;
},
);
}),
@ -339,8 +339,8 @@ class _MealPlanPageState extends State<MealPlanPage> {
MyRichText(
"",
projectViewModel.isArabic
? _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].descriptionN
: _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].description,
? _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].descriptionN!
: _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].description!,
projectViewModel.isArabic),
],
),
@ -398,8 +398,8 @@ class _MealPlanPageState extends State<MealPlanPage> {
valueListenable: isFasting,
builder: (context, val, child) {
return Checkbox(
onChanged: (bool value) {
isFasting.value = value;
onChanged: (bool? value) {
isFasting.value = value!;
isFastingVal = value;
},
value: isFastingVal,
@ -453,8 +453,8 @@ class _MealPlanPageState extends State<MealPlanPage> {
ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context);
service
.placeMealPlanOrder(getAdmittedPatientsResponseModel.projectID, selectedMealScheduleID, selectedItemIDs.join(","), projectViewModel.user.patientID,
getAdmittedPatientsResponseModel.admissionNo, getAdmittedPatientsResponseModel.isHasCompanion, isFastingVal, context)
.placeMealPlanOrder(getAdmittedPatientsResponseModel.projectID!, selectedMealScheduleID, selectedItemIDs.join(","), projectViewModel.user.patientID!,
getAdmittedPatientsResponseModel.admissionNo!, getAdmittedPatientsResponseModel.isHasCompanion!, isFastingVal, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: "Your meal order has been received successfully");
@ -479,13 +479,13 @@ class _MealPlanPageState extends State<MealPlanPage> {
void getAdmittedPatientDetails() {
ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context);
service.getAdmittedPatientDetails(projectViewModel.user.patientID, projectViewModel.inPatientProjectID, projectViewModel.getAdmissionInfoResponseModel.admissionNo, 0, 0, 0, context).then((res) {
service.getAdmittedPatientDetails(projectViewModel.user.patientID!, projectViewModel.inPatientProjectID, projectViewModel.getAdmissionInfoResponseModel.admissionNo!, 0, 0, 0, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["List_MOP_AdmittedPatients"] != null && res["List_MOP_AdmittedPatients"].length != 0) {
print(res["List_MOP_AdmittedPatients"]);
getAdmittedPatientsResponseModel = new GetAdmittedPatientsResponseModel.fromJson(res["List_MOP_AdmittedPatients"][0]);
print(getAdmittedPatientsResponseModel.dietType);
getCurrentWeekIDAndDay(getAdmittedPatientsResponseModel.dietType);
getCurrentWeekIDAndDay(getAdmittedPatientsResponseModel.dietType!);
} else {
AppToast.showErrorToast(message: "No data found for admitted patient");
getCurrentWeekIDAndDay(1);
@ -513,23 +513,23 @@ class _MealPlanPageState extends State<MealPlanPage> {
void getMealsOfScheduleID(int dietType) {
ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context);
service.getMealsOfScheduleID(projectViewModel.inPatientProjectID, projectViewModel.getAdmissionInfoResponseModel.admissionNo, dietType, currentWeek, currentDay, context).then((res) {
service.getMealsOfScheduleID(projectViewModel.inPatientProjectID, projectViewModel.getAdmissionInfoResponseModel.admissionNo!, dietType, currentWeek, currentDay, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["List_MOP_MealsOfScheduleID_Mobile"] != null && res["List_MOP_MealsOfScheduleID_Mobile"].length != 0) {
res['List_MOP_MealsOfScheduleID_Mobile'].forEach((scheduleItem) {
getMealsScheduleResponseModelList.add(GetMealsScheduleResponseModel.fromJson(scheduleItem));
});
if (getMealsScheduleResponseModelList[0].isShow) {
selectedMealScheduleID = getMealsScheduleResponseModelList[0].scheduleID;
getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[0].scheduleID, 1);
if (getMealsScheduleResponseModelList[0].isShow!) {
selectedMealScheduleID = getMealsScheduleResponseModelList[0].scheduleID!;
getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[0].scheduleID!, 1);
}
if (getMealsScheduleResponseModelList[1].isShow) {
selectedMealScheduleID = getMealsScheduleResponseModelList[1].scheduleID;
getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[1].scheduleID, 2);
if (getMealsScheduleResponseModelList[1].isShow!) {
selectedMealScheduleID = getMealsScheduleResponseModelList[1].scheduleID!;
getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[1].scheduleID!, 2);
}
if (getMealsScheduleResponseModelList[2].isShow) {
selectedMealScheduleID = getMealsScheduleResponseModelList[2].scheduleID;
getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[2].scheduleID, 3);
if (getMealsScheduleResponseModelList[2].isShow!) {
selectedMealScheduleID = getMealsScheduleResponseModelList[2].scheduleID!;
getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[2].scheduleID!, 3);
}
} else {
AppToast.showErrorToast(message: "No meal schedule found for admitted patient");
@ -589,8 +589,8 @@ class _MealPlanPageState extends State<MealPlanPage> {
_getMealItemsScheduleResponseModelBreakfast.forEach((element) {
element.getMealItemsScheduleResponseModelList.forEach((elementInner) {
if (elementInner.isDefault) {
element.selectedItemID.value = elementInner.itemID;
if (elementInner.isDefault!) {
element.selectedItemID.value = elementInner.itemID!;
}
});
});
@ -611,8 +611,8 @@ class _MealPlanPageState extends State<MealPlanPage> {
_getMealItemsScheduleResponseModelLunch.forEach((element) {
element.getMealItemsScheduleResponseModelList.forEach((elementInner) {
if (elementInner.isDefault) {
element.selectedItemID.value = elementInner.itemID;
if (elementInner.isDefault!) {
element.selectedItemID.value = elementInner.itemID!;
}
});
});
@ -632,8 +632,8 @@ class _MealPlanPageState extends State<MealPlanPage> {
});
_getMealItemsScheduleResponseModelDinner.forEach((element) {
element.getMealItemsScheduleResponseModelList.forEach((elementInner) {
if (elementInner.isDefault) {
element.selectedItemID.value = elementInner.itemID;
if (elementInner.isDefault!) {
element.selectedItemID.value = elementInner.itemID!;
}
});
});

@ -11,14 +11,14 @@ import '../../models/InPatientServices/get_medical_instructions_response_model.d
class MedicalInstructionsPage extends StatefulWidget {
List<GetMedicalInstructions> getMedicalInstructionsList;
MedicalInstructionsPage({@required this.getMedicalInstructionsList});
MedicalInstructionsPage({required this.getMedicalInstructionsList});
@override
State<MedicalInstructionsPage> createState() => _MedicalInstructionsPageState();
}
class _MedicalInstructionsPageState extends State<MedicalInstructionsPage> {
ProjectViewModel projectViewModel;
late ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
@ -59,7 +59,7 @@ class _MedicalInstructionsPageState extends State<MedicalInstructionsPage> {
padding: EdgeInsets.all(16.0),
child: Container(
child: ListView.separated(
itemCount: widget.getMedicalInstructionsList[0].medicaLInstructionsField.length,
itemCount: widget.getMedicalInstructionsList[0].medicaLInstructionsField!.length,
itemBuilder: (BuildContext context, int index) {
return Container(
child: Row(
@ -71,7 +71,7 @@ class _MedicalInstructionsPageState extends State<MedicalInstructionsPage> {
Container(
width: MediaQuery.of(context).size.width * 0.75,
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Text(widget.getMedicalInstructionsList[0].medicaLInstructionsField[index].descriptionField,
child: Text(widget.getMedicalInstructionsList[0].medicaLInstructionsField![index].descriptionField!,
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 14.0,

@ -11,14 +11,14 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class AttachInsuranceCardImageDialog extends StatefulWidget {
final String name;
final String fileNo;
final String identificationNo;
final String mobileNo;
final Function(File file, String image) image;
final bool isBirthNotification;
String name;
String fileNo;
String? identificationNo;
String? mobileNo;
Function(File file, String image) image;
bool isBirthNotification;
const AttachInsuranceCardImageDialog({Key? key, required this.name, required this.fileNo, required this.identificationNo, required this.mobileNo, required this.image, this.isBirthNotification = false}) : super(key: key);
AttachInsuranceCardImageDialog({Key? key, required this.name, required this.fileNo, this.identificationNo, this.mobileNo, required this.image, this.isBirthNotification = false}) : super(key: key);
@override
_AttachInsuranceCardImageDialogState createState() => _AttachInsuranceCardImageDialogState();
@ -30,8 +30,8 @@ class _AttachInsuranceCardImageDialogState extends State<AttachInsuranceCardImag
super.initState();
}
String? image="";
late File file;
String? image = "";
late File file;
@override
Widget build(BuildContext context) {
@ -81,7 +81,7 @@ class _AttachInsuranceCardImageDialogState extends State<AttachInsuranceCardImag
});
});
},
child: image!.isEmpty
child: image!.isEmpty
? Padding(
padding: const EdgeInsets.all(18.0),
child: Container(
@ -139,7 +139,16 @@ class _AttachInsuranceCardImageDialogState extends State<AttachInsuranceCardImag
TranslationBase.of(context).updateInsuranceManually,
() {
Navigator.pop(context);
Navigator.push(context, FadePage(page: UpdateInsuranceManually()));
Navigator.push(
context,
FadePage(
page: UpdateInsuranceManually(
patientIdentificationNo: '',
patientMobileNumber: '',
patientID: 0,
),
),
);
},
textColor: Colors.white,
color: CustomColors.accentColor,
@ -155,8 +164,8 @@ class _AttachInsuranceCardImageDialogState extends State<AttachInsuranceCardImag
),
Padding(
padding: const EdgeInsets.all(18.0),
child:
Text(TranslationBase.of(context).habibCallCenter,
child: Text(
TranslationBase.of(context).habibCallCenter,
style: TextStyle(
fontSize: 16,
letterSpacing: -0.48,

@ -20,9 +20,9 @@ import 'package:provider/provider.dart';
class PaymentService extends StatelessWidget {
ToDoCountProviderModel? model;
ProjectViewModel? projectViewModel;
late ProjectViewModel projectViewModel;
InPatientAdvanceResponseModel inPatientAdvanceResponseModel;
InPatientAdvanceResponseModel inPatientAdvanceResponseModel = InPatientAdvanceResponseModel();
@override
Widget build(BuildContext context) {
@ -182,8 +182,8 @@ class PaymentService extends StatelessWidget {
ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context);
service
.getInPatientAdvancePaymentRequests(projectViewModel.inPatientProjectID, projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionNo : 0,
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo, context)
.getInPatientAdvancePaymentRequests(projectViewModel.inPatientProjectID, projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionNo! : 0,
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo! : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo!, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) {

@ -59,7 +59,7 @@ class DateUtil {
return DateTime.now();
}
static DateTime convertStringToDateTime(String date) {
static DateTime convertStringToDateTime(String? date) {
if (date != null) {
try {
var dateT = date.split('/');
@ -92,7 +92,7 @@ class DateUtil {
}
static String convertTime(String timeStr) {
TimeOfDay time = TimeOfDay(hour: num.parse(timeStr.split(":")[0]), minute: num.parse(timeStr.split(":")[1])); // 24-hour format time
TimeOfDay time = TimeOfDay(hour: int.parse(timeStr.split(":")[0]), minute: int.parse(timeStr.split(":")[1])); // 24-hour format time
int hour = time.hourOfPeriod; // get hour in 12-hour format
String meridiem = time.period == DayPeriod.am ? "AM" : "PM"; // get AM/PM

@ -20,7 +20,7 @@ class AppExpandableNotifier extends StatefulWidget {
bool expandFlag = false;
bool hasCounter = false;
String counter = "0";
Color widgetColor = Colors.white;
Color widgetColor;
var controller = new ExpandableController();
bool isTitleSingleLine;
bool isDisabled = false;
@ -34,7 +34,7 @@ class AppExpandableNotifier extends StatefulWidget {
this.isTitleSingleLine = true,
this.hasCounter = false,
this.counter = "0",
this.widgetColor,
this.widgetColor = Colors.white,
this.isDisabled = false});
_AppExpandableNotifier createState() => _AppExpandableNotifier();

Loading…
Cancel
Save