allergies work in progress

update_flutter_3.24_vida_plus_episode_v2
Sultan khan 1 year ago
parent 726f25b91b
commit f1b87f2568

@ -285,6 +285,11 @@ const DOCTOR_RADIOLOGY_CRITICAL_FINDINGS = "Services/DoctorApplication.svc/REST/
const ACKNOWLEDGE_RADIOLOGY_CRITICAL_FINDINGS = "Services/DoctorApplication.svc/REST/Acknowledgeradcriticalfindings";
/*vida plus API */
const PATIENT_ALLERGIES = 'Services/DoctorApplication.svc/REST/PatientAllergies';
var selectedPatientType = 1;
//*********change value to decode json from Dropdown ************

@ -1161,6 +1161,7 @@ const Map<String, Map<String, String>> localizedValues = {
"principalCoveredOrNot": {"en": "Principal Diagnosis is not covered for this patient", "ar":"لا يتم تغطية التشخيص الرئيسي لهذا المريض"},
"complexDiagnosis": {"en": "Complex Diagnosis", "ar":"التشخيص المعقد"},
"noComplaintsFound": {"en": "No Chief Complaints added, please add it from the button above", "ar":"لم تتم إضافة شكاوى رئيسية ، يرجى إضافتها من الزر أعلاه"},
"noKnownAllergies": {"en": "No Known Allergies", "ar":"لا يوجد حساسية معروفة"},

@ -214,4 +214,6 @@ class LookupService extends BaseService {
break;
}
}
}

@ -336,4 +336,23 @@ class SOAPService extends LookupService {
"DoctorID":patientInfo.doctorId,
});
}
/* vida plus API allergies */
Future patientAllergies(GeneralGetReqForSOAP generalGetReqForSOAP) async {
hasError = false;
await baseAppClient.post(PATIENT_ALLERGIES,
onSuccess: (dynamic response, int statusCode) {
print("Success");
patientAllergiesList.clear();
response['List_Allergies']['entityList'].forEach((v) {
patientAllergiesList.add(GetAllergiesResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: generalGetReqForSOAP.toJson());
}
}

@ -11,19 +11,20 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../soap_update/shared_soap_widgets/SOAP_open_items.dart';
import '../chief_complaint/widgets/add_chief_complaint.dart';
import 'add_allergies.dart';
// ignore: must_be_immutable
class UpdateAllergiesWidget extends StatefulWidget {
class UpdateAllergiesWidgetVidaPlus extends StatefulWidget {
List<MySelectedAllergy>? myAllergiesList;
UpdateAllergiesWidget({Key? key, this.myAllergiesList});
UpdateAllergiesWidgetVidaPlus({Key? key, this.myAllergiesList});
@override
_UpdateAllergiesWidgetState createState() => _UpdateAllergiesWidgetState();
}
class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
bool noKnownAllergies = false;
class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidgetVidaPlus> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
@ -35,15 +36,39 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
return Column(
children: [
SOAPOpenItems(
label: "${TranslationBase.of(context).addAllergies}",
onTap: () {
SizedBox(
height: 20,
),
AddSoapItem(
title: "${TranslationBase.of(context).addAllergies}",
onAddSoapItemClicked: (){
openAllergiesList(context, changeAllState, removeAllergy);
},
),
SizedBox(
height: 20,
),
Row(
mainAxisSize: MainAxisSize.max,
children: [
Checkbox(
value: noKnownAllergies,
checkColor: Colors.white,
activeColor: Colors.red,
onChanged: (value) {
noKnownAllergies = value!;
setState(() {});
},
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, // Reduces padding around checkbox
visualDensity: VisualDensity.compact, // Minimizes size further
),
AppText(TranslationBase.of(context).noKnownAllergies)
],
),
Container(
margin: EdgeInsets.only(left: 15, right: 15, top: 15),
child: Column(
@ -190,4 +215,8 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
});
});
}
loadPatientAllergies(){
}
}

@ -18,6 +18,7 @@ class UpdateChiefComplaints extends StatelessWidget {
padding: const EdgeInsets.all(12.0),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
AddSoapItem(
title: "Add Chief Complaint",
onAddSoapItemClicked: () {},
),
if (complaints.isEmpty) ...{

@ -5,8 +5,9 @@ import 'package:flutter_svg/flutter_svg.dart';
class AddSoapItem extends StatelessWidget{
final VoidCallback onAddSoapItemClicked;
final String title;
const AddSoapItem({super.key, required this.onAddSoapItemClicked});
const AddSoapItem({super.key, required this.onAddSoapItemClicked, required this.title});
@override
Widget build(BuildContext context) {
return Row(
@ -14,11 +15,11 @@ class AddSoapItem extends StatelessWidget{
Expanded(
child: AppButton(
icon: SvgPicture.asset('assets/images/svgs/add-square.svg'),
title: TranslationBase.of(context).previous,
color: Colors.grey[300]!,
title:this.title,
color: Color(0xffEAEAEA),
fontColor: Colors.black,
fontWeight: FontWeight.w600,
disabled: true,
disabled: false,
onPressed: () async {
onAddSoapItemClicked();
},

@ -9,7 +9,6 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_step_header.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/soap_utils.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjective/subjective_call_back.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
@ -17,23 +16,24 @@ import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'allergies/update_allergies_widget.dart';
import 'chief_complaint/chief_complaints.dart';
class UpdateSubjectivePage extends StatefulWidget {
class UpdateSubjectivePageVidaPlus extends StatefulWidget {
final Function changePageViewIndex;
final Function changeLoadingState;
final PatiantInformtion patientInfo;
final int currentIndex;
UpdateSubjectivePage({Key? key, required this.changePageViewIndex, required this.patientInfo, required this.changeLoadingState, required this.currentIndex});
UpdateSubjectivePageVidaPlus({Key? key, required this.changePageViewIndex, required this.patientInfo, required this.changeLoadingState, required this.currentIndex});
@override
_UpdateSubjectivePageState createState() => _UpdateSubjectivePageState();
}
class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements SubjectiveCallBack {
class _UpdateSubjectivePageState extends State<UpdateSubjectivePageVidaPlus> implements SubjectiveCallBack {
bool isChiefExpand = false;
bool isHistoryExpand = false;
bool isAllergiesExpand = false;
@ -202,7 +202,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
},
child: Column(
children: [
UpdateAllergiesWidget(
UpdateAllergiesWidgetVidaPlus(
myAllergiesList: myAllergiesList,
),
SizedBox(

@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_al
import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_history.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/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -92,7 +92,7 @@ class _UpdateSoapIndexVidaPlusState extends State<UpdateSoapIndexVidaPlus>
},
scrollDirection: Axis.horizontal,
children: <Widget>[
UpdateSubjectivePage(
UpdateSubjectivePageVidaPlus(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,

@ -1466,6 +1466,8 @@ class TranslationBase {
String get noComplaintsFound =>
localizedValues['noComplaintsFound']![locale.languageCode]!;
String get noKnownAllergies => localizedValues['noKnownAllergies']![locale.languageCode]!;
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save