WIP:merge of two branches

update_flutter_3.24_vida_plus_episode_v2
taha.alam 1 year ago
commit 4ca9ffc5c4

@ -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 ************

@ -1162,6 +1162,9 @@ 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":"لا يوجد حساسية معروفة"},
"addChiefComplaint": {"en": "Add Chief Complaints*", "ar":"إضافة الشكاوى الرئيسية*"},
"myFavoriteList": {"en": "My Favourite List", "ar":"قائمتي المفضلة"},
"generalList": {"en": "General list", "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(){
}
}

@ -22,7 +22,6 @@ class UpdateChiefComplaints extends StatelessWidget {
onAddSoapItemClicked: () {
Navigator.push(
context,
//Todo(handle the parameter here)
MaterialPageRoute(
builder: (BuildContext context) => AddChiefComplaint(
complaints: complaints,
@ -32,6 +31,7 @@ class UpdateChiefComplaints extends StatelessWidget {
thirdField: ''),
));
},
title: "Add Chief Complaint",
),
SizedBox(height: 16),
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,10 +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: 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,6 +16,7 @@ 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';
@ -202,7 +202,7 @@ class _UpdateSubjectivePageVidaPlusState extends State<UpdateSubjectivePageVidaP
},
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/screens/patients/profile/soap_update_vida_plus/subjective/update_subjective_page_vida_plus.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';

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

Loading…
Cancel
Save