ipd issues of request model removed.

ipd-changes-for-vida-plus
parent 603a40f23d
commit 103e267f6e

@ -11,9 +11,9 @@ const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// 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/';
//

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

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

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

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

@ -152,7 +152,7 @@ class _FilterDatePageState extends State<FilterDatePage> {
from:
"${AppDateUtils.convertDateToFormat(widget.patientSearchViewModel.selectedFromDate!, "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);
Navigator.of(context).pop();
}

@ -79,6 +79,7 @@ class _InPatientScreenState extends State<InPatientScreen> with SingleTickerProv
isVidaPlusProject =
Utils.isVidaPlusProject(viewModel!, doctorProfile.projectID ?? -1);
if (isVidaPlusProject) {
requestModel.transformDataForVidaPlus();
DateTime dateTime = DateTime.now();
String currentDate = AppDateUtils.convertDateToFormat(
dateTime,
@ -114,6 +115,9 @@ class _InPatientScreenState extends State<InPatientScreen> with SingleTickerProv
GifLoaderDialogUtils.showMyDialog(context);
PatientSearchRequestModel requestModel = PatientSearchRequestModel(nursingStationID: selectedMapId, clinicID: 0);
if (isVidaPlusProject) {
requestModel.transformDataForVidaPlus();
}
await model.getInPatientList(requestModel,
isLocalBusy: true,
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/viewModel/PatientSearchViewModel.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/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/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/buttons/app_buttons_widget.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();
PatientType selectedPatientType = PatientType.inPatient;
AuthenticationViewModel authenticationViewModel = AuthenticationViewModel();
ProjectViewModel projectViewModel = ProjectViewModel();
@override
Widget build(BuildContext context) {
authenticationViewModel = Provider.of(context);
projectViewModel= Provider.of(context);
return BaseView<PatientSearchViewModel>(
onModelReady: (model) async {},
builder: (_, model, w) => AppScaffold(
@ -126,6 +130,11 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
isFormSubmitted = true;
});
PatientSearchRequestModel patientSearchRequestModel = PatientSearchRequestModel(doctorID: authenticationViewModel.doctorProfile!.doctorID);
var isVidaPlusProject =
Utils.isVidaPlusProject(projectViewModel, authenticationViewModel.doctorProfile!.projectID ?? -1);
if(isVidaPlusProject){
patientSearchRequestModel.transformDataForVidaPlus();
}
if (showOther) {
patientSearchRequestModel.firstName = firstNameInfoController.text.trim().isEmpty ? "0" : firstNameInfoController.text.trim();
patientSearchRequestModel.middleName = middleNameInfoController.text.trim().isEmpty ? "0" : middleNameInfoController.text.trim();

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

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

Loading…
Cancel
Save