|
|
|
|
@ -25,6 +25,7 @@ import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/procedures/procedure_type.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
|
|
|
|
|
class ProcedureViewModel extends BaseViewModel {
|
|
|
|
|
@ -72,8 +73,6 @@ class ProcedureViewModel extends BaseViewModel {
|
|
|
|
|
Future getProcedure({int mrn, String patientType, int appointmentNo}) async {
|
|
|
|
|
hasError = false;
|
|
|
|
|
await getDoctorProfile();
|
|
|
|
|
|
|
|
|
|
//_insuranceCardService.clearInsuranceCard();
|
|
|
|
|
setState(ViewState.Busy);
|
|
|
|
|
await _procedureService.getProcedure(
|
|
|
|
|
mrn: mrn, appointmentNo: appointmentNo);
|
|
|
|
|
@ -371,7 +370,16 @@ class ProcedureViewModel extends BaseViewModel {
|
|
|
|
|
String orderType,
|
|
|
|
|
PatiantInformtion patient,
|
|
|
|
|
List<cpe.EntityList> entityList,
|
|
|
|
|
ProcedureType procedureType}) async {
|
|
|
|
|
ProcedureType procedureType,
|
|
|
|
|
bool isLocalBusy = false,
|
|
|
|
|
}) async {
|
|
|
|
|
|
|
|
|
|
///TODO Roaa Move it to function
|
|
|
|
|
if (isLocalBusy) {
|
|
|
|
|
setState(ViewState.BusyLocal);
|
|
|
|
|
} else {
|
|
|
|
|
setState(ViewState.Busy);
|
|
|
|
|
}
|
|
|
|
|
PostProcedureReqModel postProcedureReqModel = new PostProcedureReqModel();
|
|
|
|
|
ProcedureValadteRequestModel procedureValadteRequestModel =
|
|
|
|
|
new ProcedureValadteRequestModel();
|
|
|
|
|
@ -457,7 +465,12 @@ class ProcedureViewModel extends BaseViewModel {
|
|
|
|
|
List<ProcedureTempleteDetailsModel> items,
|
|
|
|
|
PatiantInformtion patient,
|
|
|
|
|
TextEditingController remarksController,
|
|
|
|
|
BuildContext context) async {
|
|
|
|
|
{bool isLocalBusy = false,}) async {
|
|
|
|
|
if (isLocalBusy) {
|
|
|
|
|
setState(ViewState.BusyLocal);
|
|
|
|
|
} else {
|
|
|
|
|
setState(ViewState.Busy);
|
|
|
|
|
}
|
|
|
|
|
List<cpe.EntityList> entityList = List();
|
|
|
|
|
items.forEach((element) {
|
|
|
|
|
entityList.add(
|
|
|
|
|
@ -473,13 +486,11 @@ class ProcedureViewModel extends BaseViewModel {
|
|
|
|
|
eventCategory: "Procedure Checkout Screen",
|
|
|
|
|
eventAction: "Add New Procedure",
|
|
|
|
|
);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
await model.preparePostProcedure(
|
|
|
|
|
entityList: entityList,
|
|
|
|
|
patient: patient,
|
|
|
|
|
remarks: remarksController.text);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future filterSearchResults(String query,List<cpe.EntityList> masterList, List<cpe.EntityList> items) async {
|
|
|
|
|
|