development-3.3
haroon amjad 2 years ago
parent d0163d5a38
commit ad1f1e133c

@ -7,9 +7,9 @@ const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/'; const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/';
// const BASE_URL_LIVE_CARE = 'https://livecareuat.hmg.com/'; // const BASE_URL_LIVE_CARE = 'https://livecareuat.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://webservices.hmg.com/'; // const BASE_URL = 'https://webservices.hmg.com/';
@ -190,7 +190,8 @@ const GET_MY_REFERRAL_OUT_PATIENT = "Services/DoctorApplication.svc/REST/GtMyRef
const GET_MY_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient"; const GET_MY_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient";
const GET_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargePatient"; const GET_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargePatient";
const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus"; // const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus";
const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus_Async";
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';

@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/core/viewModel/InsuranceViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_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/In_patient/NoData.dart';
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/date-utils.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/widgets/patients/patient_service_title.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart';
@ -714,7 +715,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Padding( Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 8.0), horizontal: 8.0),
child: ListView.builder( child: (model.insuranceApproval[indexInsurance].apporvalDetails != null && model.insuranceApproval[indexInsurance].apporvalDetails.isNotEmpty) ? ListView.builder(
shrinkWrap: true, shrinkWrap: true,
physics: ScrollPhysics(), physics: ScrollPhysics(),
itemCount: model itemCount: model
@ -789,7 +790,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
], ],
), ),
); );
}), }) : NoData(),
), ),
], ],
), ),

@ -49,7 +49,8 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
GlobalKey key = new GlobalKey<AutoCompleteTextFieldState<MasterKeyModel>>(); GlobalKey key = new GlobalKey<AutoCompleteTextFieldState<MasterKeyModel>>();
bool isFormSubmitted = false; bool isFormSubmitted = false;
bool complexDiagnosis =true; bool complexDiagnosis = true;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
@ -98,7 +99,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: BottomSheetTitle(title: widget.isUpdate ? TranslationBase.of(context).updateAssessmentDetails: TranslationBase.of(context).addAssessmentDetails), appBar: BottomSheetTitle(title: widget.isUpdate ? TranslationBase.of(context).updateAssessmentDetails : TranslationBase.of(context).addAssessmentDetails),
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Center( child: Center(
@ -111,26 +112,23 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
SizedBox( SizedBox(
height: 16, height: 16,
), ),
Row(children: [ Row(children: [
Checkbox( Checkbox(
value:complexDiagnosis, value: complexDiagnosis,
onChanged: (bool value) { onChanged: (bool value) {
complexDiagnosis =value; complexDiagnosis = value;
setState(() { setState(() {});
},
}); checkColor: Colors.white,
}, activeColor: Colors.green,
checkColor: Colors.white, ),
activeColor: Colors.green, Text(
), TranslationBase.of(context).complexDiagnosis,
Text( ),
TranslationBase.of(context).complexDiagnosis,
),
]), ]),
SizedBox( SizedBox(
height: 16, height: 16,
), ),
Container( Container(
margin: EdgeInsets.only(left: 0, right: 0, top: 15), margin: EdgeInsets.only(left: 0, right: 0, top: 15),
child: AppTextFieldCustom( child: AppTextFieldCustom(
@ -145,8 +143,8 @@ Row(children: [
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Column( Column(children: [
children:[ InkWell( InkWell(
onTap: model.listOfICD10 != null onTap: model.listOfICD10 != null
? () { ? () {
setState(() { setState(() {
@ -156,7 +154,7 @@ Row(children: [
} }
: null, : null,
child: AppTextFieldCustom( child: AppTextFieldCustom(
onChanged: (text){ onChanged: (text) {
setState(() { setState(() {
icdNameController.text; icdNameController.text;
}); });
@ -164,22 +162,22 @@ Row(children: [
height: Utils.getTextFieldHeight(), height: Utils.getTextFieldHeight(),
onClick: model.listOfICD10 != null onClick: model.listOfICD10 != null
? () { ? () {
setState(() { setState(() {
widget.mySelectedAssessment.selectedICD = null; widget.mySelectedAssessment.selectedICD = null;
icdNameController.text = null; icdNameController.text = null;
}); });
} }
: null, : null,
hintText: TranslationBase.of(context).nameOrICD, hintText: TranslationBase.of(context).nameOrICD,
maxLines: 1, maxLines: 1,
minLines: 1, minLines: 1,
controller: icdNameController, controller: icdNameController,
enabled:true, enabled: true,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
suffixIcon: IconButton( suffixIcon: IconButton(
onPressed: () { onPressed: () {
if (icdNameController.text.length <= 3) { if (icdNameController.text.length <= 2) {
DrAppToastMsg.showErrorToast("Please enter 4 or more characters"); DrAppToastMsg.showErrorToast("Please enter 3 or more characters");
} else { } else {
model.listOfICD10.clear(); model.listOfICD10.clear();
model.callAddAssessmentLookupsServices(searchKey: icdNameController.text); model.callAddAssessmentLookupsServices(searchKey: icdNameController.text);
@ -191,75 +189,71 @@ Row(children: [
)), )),
)), )),
model.listOfICD10.length >0 && icdNameController.text.isNotEmpty ? Container( model.listOfICD10.length > 0 && icdNameController.text.isNotEmpty
color: Colors.white, ? Container(
height: MediaQuery.of(context).size.height * 0.4, //height to 9% of screen height, color: Colors.white,
child:ListView.builder( height: MediaQuery.of(context).size.height * 0.4, //height to 9% of screen height,
shrinkWrap: true, child: ListView.builder(
itemCount: model.listOfICD10.length, shrinkWrap: true,
itemBuilder: (context, index) { itemCount: model.listOfICD10.length,
return InkWell(child:ListTile( itemBuilder: (context, index) {
title: AppText( model.listOfICD10[index].description + " / " + model.listOfICD10[index].code.toString(), fontSize: 12.0)), return InkWell(
onTap: (){ child: ListTile(title: AppText(model.listOfICD10[index].description + " / " + model.listOfICD10[index].code.toString(), fontSize: 12.0)),
onTap: () {
widget.mySelectedAssessment.selectedICD = model.listOfICD10[index]; widget.mySelectedAssessment.selectedICD = model.listOfICD10[index];
icdNameController.text = model.listOfICD10[index].description; icdNameController.text = model.listOfICD10[index].description;
model.listOfICD10.clear(); model.listOfICD10.clear();
setState(() { setState(() {});
}); });
} },
); ))
: SizedBox()
}, // CustomAutoCompleteTextField(
)) :SizedBox() // isShowError: isFormSubmitted && widget.mySelectedAssessment.selectedICD == null,
// CustomAutoCompleteTextField( // child: Row(
// isShowError: isFormSubmitted && widget.mySelectedAssessment.selectedICD == null, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
// child: Row( // mainAxisSize: MainAxisSize.min,
// mainAxisAlignment: MainAxisAlignment.spaceBetween, // children: [
// mainAxisSize: MainAxisSize.min, // AutoCompleteTextField<MasterKeyModel>(
// children: [ // decoration: TextFieldsUtils.textFieldSelectorDecoration(TranslationBase.of(context).nameOrICD, null, true, suffixIcon: null),
// AutoCompleteTextField<MasterKeyModel>( // controller: icdNameController,
// decoration: TextFieldsUtils.textFieldSelectorDecoration(TranslationBase.of(context).nameOrICD, null, true, suffixIcon: null), // itemSubmitted: (item) => setState(() {
// controller: icdNameController, // widget.mySelectedAssessment.selectedICD = item;
// itemSubmitted: (item) => setState(() { // // icdNameController.text = '${item.code.trim()}/${item.description}';
// widget.mySelectedAssessment.selectedICD = item; // icdNameController.text = '${item.description}';
// // icdNameController.text = '${item.code.trim()}/${item.description}'; // }),
// icdNameController.text = '${item.description}'; // key: key,
// }), // suggestions: model.listOfICD10,
// key: key, // suggestionsAmount: model.listOfICD10.length,
// suggestions: model.listOfICD10, // itemBuilder: (context, suggestion) =>
// suggestionsAmount: model.listOfICD10.length, // new Padding(child: AppText(suggestion.description + " / " + suggestion.code.toString(), fontSize: 12.0), padding: EdgeInsets.all(8.0)),
// itemBuilder: (context, suggestion) => // itemSorter: (a, b) => 1,
// new Padding(child: AppText(suggestion.description + " / " + suggestion.code.toString(), fontSize: 12.0), padding: EdgeInsets.all(8.0)), // itemFilter: (suggestion, input) =>
// itemSorter: (a, b) => 1, // // suggestion.description.toLowerCase().startsWith(input.toLowerCase()) ||
// itemFilter: (suggestion, input) => // // suggestion.description.toLowerCase().startsWith(input.toLowerCase()) ||
// // suggestion.description.toLowerCase().startsWith(input.toLowerCase()) || // // suggestion.code.toLowerCase().startsWith(input.toLowerCase()),
// // suggestion.description.toLowerCase().startsWith(input.toLowerCase()) || // suggestion.description.toLowerCase().contains(input.toLowerCase()) ||
// // suggestion.code.toLowerCase().startsWith(input.toLowerCase()), // // suggestion.description.toLowerCase().startsWith(input.toLowerCase()) ||
// suggestion.description.toLowerCase().contains(input.toLowerCase()) || // suggestion.code.toLowerCase().contains(input.toLowerCase()),
// // suggestion.description.toLowerCase().startsWith(input.toLowerCase()) || //
// suggestion.code.toLowerCase().contains(input.toLowerCase()), // ),
// // Expanded(
// ), // child: IconButton(
// Expanded( // onPressed: () {
// child: IconButton( // print(icdNameController.text);
// onPressed: () { // if (icdNameController.text.length <= 3) {
// print(icdNameController.text); // DrAppToastMsg.showErrorToast("Please enter 4 or more characters");
// if (icdNameController.text.length <= 3) { // } else {
// DrAppToastMsg.showErrorToast("Please enter 4 or more characters"); // model.listOfICD10.clear();
// } else { // model.callAddAssessmentLookupsServices(searchKey: icdNameController.text);
// model.listOfICD10.clear(); // }
// model.callAddAssessmentLookupsServices(searchKey: icdNameController.text); // },
// } // icon: Icon(Icons.search),
// }, // ),
// icon: Icon(Icons.search), // ),
// ), // ],
// ), // ),
// ], // )
// ),
// )
]), ]),
if (widget.mySelectedAssessment.selectedICD != null) if (widget.mySelectedAssessment.selectedICD != null)
Column( Column(
@ -387,7 +381,7 @@ Row(children: [
height: 0, height: 0,
) )
: CustomBottomSheetContainer( : CustomBottomSheetContainer(
label: (widget.isUpdate ? TranslationBase.of(context).updateAssessmentDetails: TranslationBase.of(context).addAssessmentDetails), label: (widget.isUpdate ? TranslationBase.of(context).updateAssessmentDetails : TranslationBase.of(context).addAssessmentDetails),
onTap: () async { onTap: () async {
setState(() { setState(() {
isFormSubmitted = true; isFormSubmitted = true;
@ -411,7 +405,6 @@ Row(children: [
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
if (isUpdate) { if (isUpdate) {
PostAssessmentRequestUpdateModel patchAssessmentReqModel = PostAssessmentRequestUpdateModel( PostAssessmentRequestUpdateModel patchAssessmentReqModel = PostAssessmentRequestUpdateModel(
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo, episodeId: widget.patientInfo.episodeNo,
@ -419,13 +412,14 @@ Row(children: [
createdByName: doctorProfile.doctorName, createdByName: doctorProfile.doctorName,
createdBy: doctorProfile.doctorID, createdBy: doctorProfile.doctorID,
icdCodeDetails: [ icdCodeDetails: [
new IcdCodeDetailsUpdate( new IcdCodeDetailsUpdate(
remarks: mySelectedAssessment.remark, remarks: mySelectedAssessment.remark,
complexDiagnosis: complexDiagnosis, complexDiagnosis: complexDiagnosis,
conditionId: mySelectedAssessment.selectedDiagnosisCondition.id, conditionId: mySelectedAssessment.selectedDiagnosisCondition.id,
prevIcdCode10ID: mySelectedAssessment.icdCode10ID, prevIcdCode10ID: mySelectedAssessment.icdCode10ID,
diagnosisTypeId: mySelectedAssessment.selectedDiagnosisType.id, diagnosisTypeId: mySelectedAssessment.selectedDiagnosisType.id,
icdcode10Id: mySelectedAssessment.selectedICD.code)]); icdcode10Id: mySelectedAssessment.selectedICD.code)
]);
await model.patchAssessment(patchAssessmentReqModel); await model.patchAssessment(patchAssessmentReqModel);
} else { } else {

Loading…
Cancel
Save