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,114 +60,120 @@ 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(
child: FractionallySizedBox( baseViewModel: model,
widthFactor: .97, child: SingleChildScrollView(
child: Center( child: FractionallySizedBox(
child: Column( widthFactor: .97,
children: [ child: Center(
Container( child: Column(
height: MediaQuery.of(context).size.height * 0.070, children: [
), Container(
NetworkBaseView( height: MediaQuery.of(context).size.height * 0.070,
baseViewModel: model, ),
child: Container( // NetworkBaseView(
child: Padding( // baseViewModel: model,
padding: EdgeInsets.all(12.0), // child:
child: Column( Container(
crossAxisAlignment: CrossAxisAlignment.start, child: Padding(
children: [ padding: EdgeInsets.all(12.0),
if (procedureType == ProcedureType.PROCEDURE) child: Column(
Column( crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( if (procedureType == ProcedureType.PROCEDURE)
mainAxisAlignment: MainAxisAlignment.spaceBetween, Column(
children: [ children: [
AppText( Row(
TranslationBase.of(context).pleaseEnterProcedure, mainAxisAlignment: MainAxisAlignment.spaceBetween,
fontWeight: FontWeight.w700, children: [
fontSize: 20, AppText(
), TranslationBase.of(context).pleaseEnterProcedure,
], fontWeight: FontWeight.w700,
), fontSize: 20,
SizedBox( ),
height: MediaQuery.of(context).size.height * 0.02, ],
), ),
Row( SizedBox(
children: [ height: MediaQuery.of(context).size.height * 0.02,
Container( ),
width: MediaQuery.of(context).size.width * 0.79, Row(
child: AppTextFieldCustom( children: [
hintText: TranslationBase.of(context).searchProcedureHere, Container(
isTextFieldHasSuffix: false, width: MediaQuery.of(context).size.width * 0.79,
maxLines: 1, child: AppTextFieldCustom(
minLines: 1, hintText: TranslationBase.of(context).searchProcedureHere,
hasBorder: true, isTextFieldHasSuffix: false,
controller: procedureName, maxLines: 1,
onChanged: (value) {}, minLines: 1,
onFieldSubmitted: () {}, hasBorder: true,
controller: procedureName,
onChanged: (value) {},
onFieldSubmitted: () {},
),
), ),
), SizedBox(
SizedBox( width: MediaQuery.of(context).size.width * 0.02,
width: MediaQuery.of(context).size.width * 0.02, ),
), Expanded(
Expanded( child: InkWell(
child: InkWell( onTap: () async {
onTap: () async { if (procedureName.text.isNotEmpty && procedureName.text.length >= 3) {
if (procedureName.text.isNotEmpty && procedureName.text.length >= 3) { GifLoaderDialogUtils.showMyDialog(context);
GifLoaderDialogUtils.showMyDialog(context); await model.getProcedureCategory(patientId: patient.patientId, categoryName: procedureName.text, isLocalBusy: true);
await model.getProcedureCategory(patientId: patient.patientId, categoryName: procedureName.text, isLocalBusy: true); if (model.state == ViewState.ErrorLocal) {
if (model.state == ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error);
DrAppToastMsg.showErrorToast(model.error); }
GifLoaderDialogUtils.hideDialog(context);
} else {
DrAppToastMsg.showErrorToast(
TranslationBase.of(context).atLeastThreeCharacters,
);
} }
GifLoaderDialogUtils.hideDialog(context); },
} else { child: Icon(
DrAppToastMsg.showErrorToast( Icons.search,
TranslationBase.of(context).atLeastThreeCharacters, size: 25.0,
); ),
}
},
child: Icon(
Icons.search,
size: 25.0,
), ),
), ),
), ],
], ),
), ],
], ),
), 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:
child: EntityListCheckboxSearchWidget( EntityListCheckboxSearchWidget(
model: widget.model, model: widget.model,
masterList: model.categoriesList[0].entityList!, masterList: model.categoriesList[0].entityList!,
removeProcedure: (item) { removeProcedure: (item) {
setState(() { setState(() {
entityList.remove(item); entityList.remove(item);
}); });
}, },
addProcedure: (history) { addProcedure: (history) {
setState(() { setState(() {
entityList.add(history); entityList.add(history);
}); });
}, },
addSelectedHistories: () {}, addSelectedHistories: () {},
selectedType: (val) { selectedType: (val) {
selectedType = val; selectedType = val;
}, },
isEntityListSelected: (master) => widget.model.isEntityListSelected(master, entityList), isEntityListSelected: (master) => widget.model.isEntityListSelected(master, entityList),
)), ),
SizedBox( // ),
height: 10, SizedBox(
) height: 10,
], )
],
),
), ),
), ),
), // ),
), ],
], ),
), ),
), ),
), ),
@ -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