ipd issues of request model removed.

qassim-MOH-demo-
parent 603a40f23d
commit 103e267f6e

@ -11,9 +11,9 @@ const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'http://10.20.200.111:1010/'; // const BASE_URL = 'http://10.20.200.111:1010/';
// const BASE_URL = 'https://uat.hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://webservices.hmg.com/'; // const BASE_URL = 'https://webservices.hmg.com/';
// //

@ -12,6 +12,7 @@ class PostChiefComplaintRequestModel {
int? numberOfWeeks; int? numberOfWeeks;
dynamic doctorID; dynamic doctorID;
dynamic editedBy; dynamic editedBy;
bool? isVidaPlusProject;
PostChiefComplaintRequestModel( PostChiefComplaintRequestModel(
{this.appointmentNo, {this.appointmentNo,
@ -25,7 +26,7 @@ class PostChiefComplaintRequestModel {
this.doctorID, this.doctorID,
this.editedBy, this.editedBy,
this.numberOfWeeks, this.numberOfWeeks,
this.admissionNo,this.pomrId}); this.admissionNo});
PostChiefComplaintRequestModel.fromJson(Map<String, dynamic> json) { PostChiefComplaintRequestModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['AppointmentNo']; appointmentNo = json['AppointmentNo'];
@ -40,7 +41,6 @@ class PostChiefComplaintRequestModel {
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
editedBy = json['EditedBy']; editedBy = json['EditedBy'];
admissionNo = json['AdmissionNo']; admissionNo = json['AdmissionNo'];
pomrId = json[' String? pomrId;'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -60,7 +60,7 @@ class PostChiefComplaintRequestModel {
data['isLactation'] = this.isLactation; data['isLactation'] = this.isLactation;
data['numberOfWeeks'] = this.numberOfWeeks; data['numberOfWeeks'] = this.numberOfWeeks;
data['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
data['pomrId'] = this.pomrId;
if (editedBy != null) { if (editedBy != null) {
data['EditedBy'] = this.editedBy; data['EditedBy'] = this.editedBy;
} }

@ -84,4 +84,12 @@ class PatientSearchRequestModel {
data['PageSize'] = this.pageSize; data['PageSize'] = this.pageSize;
return data; return data;
} }
void transformDataForVidaPlus(){
this.firstName = "";
this.middleName = "";
this.lastName = "";
this.patientMobileNumber = "";
this.patientIdentificationID = "";
}
} }

@ -934,7 +934,6 @@ class SOAPViewModel extends BaseViewModel {
isLactation: false, isLactation: false,
ispregnant: false, ispregnant: false,
doctorID: '', doctorID: '',
pomrId: patientInfo.pomrId,
numberOfWeeks: 0); numberOfWeeks: 0);
} }

@ -53,7 +53,7 @@ class UcafViewModel extends BaseViewModel {
} }
Future getLanguage() async { Future getLanguage() async {
selectedLanguage = await sharedPref.getString(APP_Language); selectedLanguage = await sharedPref.getString(APP_Language)??"en";
} }
Future getUCAFData(PatiantInformtion patient) async { Future getUCAFData(PatiantInformtion patient) async {

@ -152,7 +152,7 @@ class _FilterDatePageState extends State<FilterDatePage> {
from: from:
"${AppDateUtils.convertDateToFormat(widget.patientSearchViewModel.selectedFromDate!, "yyyy-MM-dd")} 00:00:00", "${AppDateUtils.convertDateToFormat(widget.patientSearchViewModel.selectedFromDate!, "yyyy-MM-dd")} 00:00:00",
to: "${AppDateUtils.convertDateToFormat(widget.patientSearchViewModel.selectedToDate!, "yyyy-MM-dd")} 00:00:00", to: "${AppDateUtils.convertDateToFormat(widget.patientSearchViewModel.selectedToDate!, "yyyy-MM-dd")} 00:00:00",
searchType: null), searchType: null)..transformDataForVidaPlus(),
isForceFullRefresh: true); isForceFullRefresh: true);
Navigator.of(context).pop(); Navigator.of(context).pop();
} }

@ -79,6 +79,7 @@ class _InPatientScreenState extends State<InPatientScreen> with SingleTickerProv
isVidaPlusProject = isVidaPlusProject =
Utils.isVidaPlusProject(viewModel!, doctorProfile.projectID ?? -1); Utils.isVidaPlusProject(viewModel!, doctorProfile.projectID ?? -1);
if (isVidaPlusProject) { if (isVidaPlusProject) {
requestModel.transformDataForVidaPlus();
DateTime dateTime = DateTime.now(); DateTime dateTime = DateTime.now();
String currentDate = AppDateUtils.convertDateToFormat( String currentDate = AppDateUtils.convertDateToFormat(
dateTime, dateTime,
@ -114,6 +115,9 @@ class _InPatientScreenState extends State<InPatientScreen> with SingleTickerProv
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
PatientSearchRequestModel requestModel = PatientSearchRequestModel(nursingStationID: selectedMapId, clinicID: 0); PatientSearchRequestModel requestModel = PatientSearchRequestModel(nursingStationID: selectedMapId, clinicID: 0);
if (isVidaPlusProject) {
requestModel.transformDataForVidaPlus();
}
await model.getInPatientList(requestModel, await model.getInPatientList(requestModel,
isLocalBusy: true, isLocalBusy: true,
isVidaPlusProject: Utils.isVidaPlusProject( isVidaPlusProject: Utils.isVidaPlusProject(

@ -3,10 +3,12 @@ import 'package:doctor_app_flutter/core/enum/patient_type.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
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/patient_search/patient_search_result_screen.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_result_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.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/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
@ -30,10 +32,12 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
TextEditingController lastNameFileInfoController = TextEditingController(); TextEditingController lastNameFileInfoController = TextEditingController();
PatientType selectedPatientType = PatientType.inPatient; PatientType selectedPatientType = PatientType.inPatient;
AuthenticationViewModel authenticationViewModel = AuthenticationViewModel(); AuthenticationViewModel authenticationViewModel = AuthenticationViewModel();
ProjectViewModel projectViewModel = ProjectViewModel();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
authenticationViewModel = Provider.of(context); authenticationViewModel = Provider.of(context);
projectViewModel= Provider.of(context);
return BaseView<PatientSearchViewModel>( return BaseView<PatientSearchViewModel>(
onModelReady: (model) async {}, onModelReady: (model) async {},
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
@ -126,6 +130,11 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
isFormSubmitted = true; isFormSubmitted = true;
}); });
PatientSearchRequestModel patientSearchRequestModel = PatientSearchRequestModel(doctorID: authenticationViewModel.doctorProfile!.doctorID); PatientSearchRequestModel patientSearchRequestModel = PatientSearchRequestModel(doctorID: authenticationViewModel.doctorProfile!.doctorID);
var isVidaPlusProject =
Utils.isVidaPlusProject(projectViewModel, authenticationViewModel.doctorProfile!.projectID ?? -1);
if(isVidaPlusProject){
patientSearchRequestModel.transformDataForVidaPlus();
}
if (showOther) { if (showOther) {
patientSearchRequestModel.firstName = firstNameInfoController.text.trim().isEmpty ? "0" : firstNameInfoController.text.trim(); patientSearchRequestModel.firstName = firstNameInfoController.text.trim().isEmpty ? "0" : firstNameInfoController.text.trim();
patientSearchRequestModel.middleName = middleNameInfoController.text.trim().isEmpty ? "0" : middleNameInfoController.text.trim(); patientSearchRequestModel.middleName = middleNameInfoController.text.trim().isEmpty ? "0" : middleNameInfoController.text.trim();

@ -213,7 +213,7 @@ class _MedicalReportPageState extends State<MedicalReportPage> {
: model : model
.medicalReportList[index].doctorName!, .medicalReportList[index].doctorName!,
url: model url: model
.medicalReportList[index].doctorImageURL!, .medicalReportList[index].doctorImageURL!??"",
), ),
width: 50, width: 50,
height: 50, height: 50,

@ -60,7 +60,9 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
}, },
builder: (BuildContext context, ProcedureViewModel model, Widget? child) => AppScaffold( builder: (BuildContext context, ProcedureViewModel model, Widget? child) => AppScaffold(
isShowAppBar: false, isShowAppBar: false,
body: SingleChildScrollView( body: NetworkBaseView(
baseViewModel: model,
child: SingleChildScrollView(
child: FractionallySizedBox( child: FractionallySizedBox(
widthFactor: .97, widthFactor: .97,
child: Center( child: Center(
@ -69,9 +71,10 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
Container( Container(
height: MediaQuery.of(context).size.height * 0.070, height: MediaQuery.of(context).size.height * 0.070,
), ),
NetworkBaseView( // NetworkBaseView(
baseViewModel: model, // baseViewModel: model,
child: Container( // child:
Container(
child: Padding( child: Padding(
padding: EdgeInsets.all(12.0), padding: EdgeInsets.all(12.0),
child: Column( child: Column(
@ -138,9 +141,10 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
], ],
), ),
if ((procedureType == ProcedureType.PROCEDURE ? procedureName.text.isNotEmpty : true) && model.categoriesList.length != 0) if ((procedureType == ProcedureType.PROCEDURE ? procedureName.text.isNotEmpty : true) && model.categoriesList.length != 0)
NetworkBaseView( // NetworkBaseView(
baseViewModel: model, // baseViewModel: model,
child: EntityListCheckboxSearchWidget( // child:
EntityListCheckboxSearchWidget(
model: widget.model, model: widget.model,
masterList: model.categoriesList[0].entityList!, masterList: model.categoriesList[0].entityList!,
removeProcedure: (item) { removeProcedure: (item) {
@ -158,7 +162,8 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
selectedType = val; selectedType = val;
}, },
isEntityListSelected: (master) => widget.model.isEntityListSelected(master, entityList), isEntityListSelected: (master) => widget.model.isEntityListSelected(master, entityList),
)), ),
// ),
SizedBox( SizedBox(
height: 10, height: 10,
) )
@ -166,12 +171,13 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
), ),
), ),
), ),
), // ),
], ],
), ),
), ),
), ),
), ),
),
bottomSheet: model.state == ViewState.BusyLocal || entityList.isEmpty bottomSheet: model.state == ViewState.BusyLocal || entityList.isEmpty
? Container( ? Container(
height: 0, height: 0,
@ -193,16 +199,16 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
builder: (BuildContext context) { builder: (BuildContext context) {
return ConfirmationDialog(title:TranslationBase.of(context).afterOrderCreation, return ConfirmationDialog(title:TranslationBase.of(context).afterOrderCreation,
onTapGrant: () async{ onTapGrant: () async{
GifLoaderDialogUtils.showMyDialog(context); // GifLoaderDialogUtils.showMyDialog(context);
await widget.model.preparePostProcedure( await widget.model.preparePostProcedure(
orderType: selectedType.toString(), orderType: selectedType.toString(),
entityList: entityList, entityList: entityList,
patient: patient, patient: patient,
remarks: remarksController.text, remarks: remarksController.text,
procedureType: ProcedureType.PROCEDURE, procedureType: ProcedureType.PROCEDURE,
isLocalBusy: true, isLocalBusy: false,
); );
GifLoaderDialogUtils.hideDialog(context); // GifLoaderDialogUtils.hideDialog(context);
}); });
}, },

Loading…
Cancel
Save