WD: data mapping and request handling

update_flutter_3.24_vida_plus_episode
taha.alam 1 year ago
parent 8f12c3da17
commit 248c55f75d

@ -73,7 +73,7 @@ class AllergyReactionDTOs {
int? allergyReactionID; int? allergyReactionID;
String? allergyReactionName; String? allergyReactionName;
int? allergyReactionRevisionID; int? allergyReactionRevisionID;
int? hospitalGroupID; dynamic? hospitalGroupID;
int? hospitalID; int? hospitalID;
bool? isActive; bool? isActive;
bool? isSelected =false; bool? isSelected =false;

@ -175,6 +175,8 @@ class ChiefComplains {
int? patientId; int? patientId;
String? patientName; String? patientName;
int? patientPomrId; int? patientPomrId;
int? chiefComplainTemplateId;
ChiefComplains( ChiefComplains(
{this.appointmentId, {this.appointmentId,
@ -200,6 +202,7 @@ class ChiefComplains {
ChiefComplains.fromJson(Map<String, dynamic> json) { ChiefComplains.fromJson(Map<String, dynamic> json) {
appointmentId = json['appointmentId']; appointmentId = json['appointmentId'];
chiefComplain = json['chiefComplain']; chiefComplain = json['chiefComplain'];
chiefComplainTemplateId = json['chiefComplainTemplateId'];
chiefComplainId = json['chiefComplainId']; chiefComplainId = json['chiefComplainId'];
clinicId = json['clinicId']; clinicId = json['clinicId'];
createdBy = json['createdBy']; createdBy = json['createdBy'];
@ -235,6 +238,7 @@ class ChiefComplains {
data['hospitalId'] = this.hospitalId; data['hospitalId'] = this.hospitalId;
data['loginUserId'] = this.loginUserId; data['loginUserId'] = this.loginUserId;
data['modifiedBy'] = this.modifiedBy; data['modifiedBy'] = this.modifiedBy;
data['chiefComplainTemplateId'] = this.chiefComplainTemplateId;
data['modifiedId'] = this.modifiedId; data['modifiedId'] = this.modifiedId;
data['modifiedOn'] = this.modifiedOn; data['modifiedOn'] = this.modifiedOn;
data['patientId'] = this.patientId; data['patientId'] = this.patientId;

@ -58,12 +58,12 @@ class CreatePhysicalExamination {
extension ConvertCategoryToCreatePhysicalExamination on Category { extension ConvertCategoryToCreatePhysicalExamination on Category {
CreatePhysicalExamination createPhysicalExaminationFromCategory() => CreatePhysicalExamination createPhysicalExaminationFromCategory() =>
CreatePhysicalExamination() CreatePhysicalExamination()
..isChecked = true
..physicalExaminationDescription = this.name ..physicalExaminationDescription = this.name
..physicalExaminationSystemID = this.id ..physicalExaminationSystemID = this.id
..physicalExaminationCondition = this.selectedCondition ..physicalExaminationCondition = this.selectedCondition
..remark = this.remarksController.text ..remark = this.remarksController.text
..selected = false ..selected = false
..isChecked = false
..specialityID = this.specialityId ..specialityID = this.specialityId
..patientID = this.paitientId ..patientID = this.paitientId
..pomrid = this.pomrId ..pomrid = this.pomrId

@ -86,6 +86,7 @@ class SOAPService extends LookupService {
Map<String, List<Category>> specialityDetails = {}; Map<String, List<Category>> specialityDetails = {};
Map<String, dynamic> diagnosisTypeList = {}; Map<String, dynamic> diagnosisTypeList = {};
Map<String, dynamic> conditionTypeList = {}; Map<String, dynamic> conditionTypeList = {};
Map<String, dynamic> conditionTypeMapWithIdAsKey = {};
List<String> icdVersionList = []; List<String> icdVersionList = [];
bool showAuditBottomSheet = false; bool showAuditBottomSheet = false;
@ -460,6 +461,8 @@ class SOAPService extends LookupService {
Future addAllergies(AllergiesListVidaPlus allergy, Future addAllergies(AllergiesListVidaPlus allergy,
PatiantInformtion patientInfo, bool isNoKnown) async { PatiantInformtion patientInfo, bool isNoKnown) async {
var hospitalGroudpId = await sharedPref.getString(DOCTOR_SETUP_ID);
if (!isNoKnown) { if (!isNoKnown) {
allergy.allergyReactionDTOs!.forEach((value) { allergy.allergyReactionDTOs!.forEach((value) {
value.patientID = patientInfo.patientMRN; value.patientID = patientInfo.patientMRN;
@ -468,6 +471,11 @@ class SOAPService extends LookupService {
value.severity = value.severity ?? 1; value.severity = value.severity ?? 1;
}); });
} }
allergy.allergyReactionDTOs?.forEach((value) {
value.hospitalGroupID = hospitalGroudpId;
value.hospitalID = patientInfo.projectId;
});
var request = { var request = {
"patientsAllergyRevisionID": allergy.allergyRevisionID, "patientsAllergyRevisionID": allergy.allergyRevisionID,
"patientMRN": patientInfo.patientMRN, "patientMRN": patientInfo.patientMRN,
@ -519,16 +527,18 @@ class SOAPService extends LookupService {
/*changed request parameters based on the vida plus requested */ /*changed request parameters based on the vida plus requested */
var doctorProfile = await sharedPref.getObj(LOGGED_IN_USER); var doctorProfile = await sharedPref.getObj(LOGGED_IN_USER);
var hospitalGroudpId = await sharedPref.getString(DOCTOR_SETUP_ID);
List<PatientsAllergyReactionsDTOs>? reaction = List<PatientsAllergyReactionsDTOs>? reaction =
allergy.patientsAllergyReactionsDTOs!; allergy.patientsAllergyReactionsDTOs!;
List<AllergyReactionDTOs>? reactionRequest = []; List<AllergyReactionDTOs>? reactionRequest = [];
reaction.forEach((value) { reaction.forEach((value) async {
reactionRequest.add(AllergyReactionDTOs( reactionRequest.add(AllergyReactionDTOs(
patientID: patientInfo.patientMRN, patientID: patientInfo.patientMRN,
pomrid: int.parse(patientInfo.pomrId!), pomrid: int.parse(patientInfo.pomrId!),
hospitalGroupID: value.hospitalGroupID, hospitalGroupID: hospitalGroudpId,
allergyReactionMappingID: 0, allergyReactionMappingID: 0,
hospitalID: value.hospitalID, hospitalID: patientInfo.projectId,
isActive: value.isActive, isActive: value.isActive,
allergyReactionID: value.allergyReactionID, allergyReactionID: value.allergyReactionID,
allergyReactionName: value.allergyReactionName, allergyReactionName: value.allergyReactionName,
@ -566,6 +576,7 @@ class SOAPService extends LookupService {
Future updateAllergies( Future updateAllergies(
PatientAllergiesVidaPlus allergy, PatiantInformtion patientInfo) async { PatientAllergiesVidaPlus allergy, PatiantInformtion patientInfo) async {
var doctorProfile = await sharedPref.getObj(LOGGED_IN_USER); var doctorProfile = await sharedPref.getObj(LOGGED_IN_USER);
var hospitalGroudpId = await sharedPref.getString(DOCTOR_SETUP_ID);
List<PatientsAllergyReactionsDTOs>? reaction = List<PatientsAllergyReactionsDTOs>? reaction =
allergy.patientsAllergyReactionsDTOs!; allergy.patientsAllergyReactionsDTOs!;
List<AllergyReactionDTOs>? reactionRequest = []; List<AllergyReactionDTOs>? reactionRequest = [];
@ -573,9 +584,9 @@ class SOAPService extends LookupService {
reactionRequest.add(AllergyReactionDTOs( reactionRequest.add(AllergyReactionDTOs(
patientID: patientInfo.patientMRN, patientID: patientInfo.patientMRN,
pomrid: int.parse(patientInfo.pomrId!), pomrid: int.parse(patientInfo.pomrId!),
hospitalGroupID: value.hospitalGroupID, hospitalGroupID: hospitalGroudpId,
allergyReactionMappingID: 0, allergyReactionMappingID: 0,
hospitalID: value.hospitalID, hospitalID: patientInfo.projectId,
isActive: value.isActive, isActive: value.isActive,
allergyReactionID: value.allergyReactionID, allergyReactionID: value.allergyReactionID,
allergyReactionName: value.allergyReactionName, allergyReactionName: value.allergyReactionName,
@ -788,6 +799,9 @@ class SOAPService extends LookupService {
response['ListDiagnosisCondition']['resultData'] response['ListDiagnosisCondition']['resultData']
.forEach((v) => conditionTypeList[v['itemName']] = v['id']); .forEach((v) => conditionTypeList[v['itemName']] = v['id']);
; ;
response['ListDiagnosisCondition']['resultData']
.forEach((v) => conditionTypeMapWithIdAsKey[v['id']] = v['itemName']);
;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
searchChiefComplaintListVidaPlus.clear(); searchChiefComplaintListVidaPlus.clear();
hasError = true; hasError = true;
@ -1071,10 +1085,10 @@ class SOAPService extends LookupService {
"patientId": patient.patientId, "patientId": patient.patientId,
"doctorId": patient.doctorId, "doctorId": patient.doctorId,
"pomrId": patient.pomrId, "pomrId": patient.pomrId,
"appointmentId": diagnosis.appointmentId, "appointmentId": patient.appointmentNo,
"createdBy": patient.doctorId, "createdBy": patient.doctorId,
"hospitalId": patient.projectId, "hospitalId": patient.projectId,
"hospitalGroupId": diagnosis.hospitalGroupId, "hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID),
"clinicGroupId": diagnosis.clinicGroupId ?? patient.clinicGroupId, "clinicGroupId": diagnosis.clinicGroupId ?? patient.clinicGroupId,
"clinicId": diagnosis.clinicId, "clinicId": diagnosis.clinicId,
"isSelected": true, "isSelected": true,
@ -1156,6 +1170,8 @@ class SOAPService extends LookupService {
String remarks, String remarks,
bool isNew) async { bool isNew) async {
Map<String, dynamic>? user = await sharedPref.getObj(LOGGED_IN_USER); Map<String, dynamic>? user = await sharedPref.getObj(LOGGED_IN_USER);
var mappedConditionValue = conditionTypeList[conditionType] ?? '';
var request = { var request = {
"pomrId": patient.pomrId, "pomrId": patient.pomrId,
"appointmentId": patient.appointmentNo, "appointmentId": patient.appointmentNo,
@ -1165,7 +1181,7 @@ class SOAPService extends LookupService {
"hospitalId": patient.projectId, "hospitalId": patient.projectId,
"hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID), "hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID),
"diagnosisType": diagnosisType, "diagnosisType": diagnosisType,
"condition": conditionType, "condition": mappedConditionValue,
"remarks": remarks, "remarks": remarks,
"icdType": searchDiagnosis!.icdType, "icdType": searchDiagnosis!.icdType,
// "icdVersion": searchDiagnosis.icdVersion, // "icdVersion": searchDiagnosis.icdVersion,
@ -1208,6 +1224,7 @@ class SOAPService extends LookupService {
String remarks, String remarks,
bool isNew) async { bool isNew) async {
Map<String, dynamic>? user = await sharedPref.getObj(LOGGED_IN_USER); Map<String, dynamic>? user = await sharedPref.getObj(LOGGED_IN_USER);
var mappedConditionValue = conditionTypeList[conditionType] ?? '';
var request = { var request = {
"pomrId": patient.pomrId, "pomrId": patient.pomrId,
"appointmentId": patient.appointmentNo, "appointmentId": patient.appointmentNo,
@ -1217,10 +1234,11 @@ class SOAPService extends LookupService {
"hospitalId": patient.projectId, "hospitalId": patient.projectId,
"hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID), "hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID),
"diagnosisType": diagnosisType, "diagnosisType": diagnosisType,
"condition": conditionType, "condition": mappedConditionValue,
"remarks": remarks, "remarks": remarks,
"icdType": searchDiagnosis!.icdType, "icdType": searchDiagnosis!.icdType,
"selectedIcdCode": searchDiagnosis.diseasesCode, "selectedIcdCode": searchDiagnosis.diseasesCode,
"selectedNandaCode": searchDiagnosis.diseasesCode,
// "icdVersion": searchDiagnosis.icdVersion, // "icdVersion": searchDiagnosis.icdVersion,
"icdSubVersion": searchDiagnosis.icdSubVersion, "icdSubVersion": searchDiagnosis.icdSubVersion,
"isNew": isNew, "isNew": isNew,
@ -1325,8 +1343,7 @@ class SOAPService extends LookupService {
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
if (response['ListDiagnosisResolve'] != null && if (response['ListDiagnosisResolve'] != null &&
response['ListDiagnosisResolve']['resultData'] != null && response['ListDiagnosisResolve']['resultData'] != null &&
(response['ListDiagnosisResolve']['resultData'] as List) (response['ListDiagnosisResolve']['resultData'] as List).isNotEmpty) {
.isNotEmpty) {
success = true; success = true;
} }
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
@ -1360,6 +1377,7 @@ class SOAPService extends LookupService {
Future<bool> getPatientCondition() async { Future<bool> getPatientCondition() async {
Map<String, dynamic> request = {}; Map<String, dynamic> request = {};
var success = false; var success = false;
patientConditionList.clear();
await baseAppClient.post(GET_PATIENT_CLINIC, await baseAppClient.post(GET_PATIENT_CLINIC,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
response['ListPatientConditionProgress']['resultData'].forEach((v) => response['ListPatientConditionProgress']['resultData'].forEach((v) =>
@ -1383,7 +1401,9 @@ class SOAPService extends LookupService {
action.chiefComplains!.forEach((action2) { action.chiefComplains!.forEach((action2) {
chiefComplaintList.add({ chiefComplaintList.add({
"chiefComplain": action2.chiefComplain, "chiefComplain": action2.chiefComplain,
"chiefComplainTemplateId": action!.chiefComplainTemplateId "chiefComplainTemplateId": action2.chiefComplainTemplateId ??
action.chiefComplainTemplateId ??
''
}); });
}); });
}); });
@ -1391,7 +1411,11 @@ class SOAPService extends LookupService {
"appointmentId": patient.appointmentNo, "appointmentId": patient.appointmentNo,
"projectId": patient.projectId, "projectId": patient.projectId,
"setupId": await sharedPref.getString(DOCTOR_SETUP_ID), "setupId": await sharedPref.getString(DOCTOR_SETUP_ID),
"chiefComplain": chiefComplaintList "chiefComplain": chiefComplaintList,
'EpisodeID': chiefComplaint.first.episodeId,
'pomrId': patient.pomrId,
'doctorId': patient.doctorId,
'patientId': patient.patientId
}; };
hasError = false; hasError = false;
await baseAppClient.post(CONTINUE_EPISODE_VP, await baseAppClient.post(CONTINUE_EPISODE_VP,
@ -1414,7 +1438,7 @@ class SOAPService extends LookupService {
"appointmentId": patient.appointmentNo, "appointmentId": patient.appointmentNo,
"projectId": patient.projectId, "projectId": patient.projectId,
"setupId": await sharedPref.getString(DOCTOR_SETUP_ID), "setupId": await sharedPref.getString(DOCTOR_SETUP_ID),
"chiefComplain": listofComplain "chiefComplain": listofComplain,
}; };
hasError = false; hasError = false;
await baseAppClient.post(CONTINUE_EPISODE_VP, await baseAppClient.post(CONTINUE_EPISODE_VP,

@ -1572,4 +1572,13 @@ class SOAPViewModel extends BaseViewModel {
_SOAPService.searchAllergiesList.clear(); _SOAPService.searchAllergiesList.clear();
notifyListeners(); notifyListeners();
} }
String? getConditionValue(String key){
print('the value is ${_SOAPService.conditionTypeMapWithIdAsKey[key.trim()]}');
return _SOAPService.conditionTypeMapWithIdAsKey[key.trim()];
}
String? getConditionID(String key){
print('the value is ${_SOAPService.conditionTypeMapWithIdAsKey[key.trim()]}');
return _SOAPService.conditionTypeList[key.trim()];
}
} }

@ -69,6 +69,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage>
mySelectedAssessmentList.clear(); mySelectedAssessmentList.clear();
WidgetsBinding.instance.addPostFrameCallback((_) async { WidgetsBinding.instance.addPostFrameCallback((_) async {
widget.changeLoadingState(true); widget.changeLoadingState(true);
model.getConditionAndType(widget.patientInfo);
model.getPreviousPatientDetails(widget.patientInfo); model.getPreviousPatientDetails(widget.patientInfo);
model.getCurrentDiagnosisList(widget.patientInfo); model.getCurrentDiagnosisList(widget.patientInfo);
widget.changeLoadingState(false); widget.changeLoadingState(false);

@ -93,8 +93,10 @@ class _CurrentDiagnosisState extends State<CurrentDiagnosis> {
status: status:
widget.currentDiagnosisItems[index].status ?? widget.currentDiagnosisItems[index].status ??
'', '',
condition: widget condition: model.getConditionValue(widget
.currentDiagnosisItems[index].condition ?? .currentDiagnosisItems[index]
.condition ??
'') ??
'', '',
remarks: remarks:
widget.currentDiagnosisItems[index].remarks ?? widget.currentDiagnosisItems[index].remarks ??
@ -111,14 +113,16 @@ class _CurrentDiagnosisState extends State<CurrentDiagnosis> {
break; break;
case SoapDetailItemActions.EDIT: case SoapDetailItemActions.EDIT:
if (widget.currentDiagnosisItems[index] if (widget.currentDiagnosisItems[index]
.status == .status ==
"Deleted") { "Deleted") {
DrAppToastMsg.showErrorToast(TranslationBase.of(context).diagnosisAlreadyDeleted); DrAppToastMsg.showErrorToast(
TranslationBase.of(context)
.diagnosisAlreadyDeleted);
return; return;
} }
if (widget.currentDiagnosisItems[index] if (widget.currentDiagnosisItems[index]
.resolved == .resolved ==
true) { true) {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
TranslationBase.of(context) TranslationBase.of(context)
@ -141,9 +145,11 @@ class _CurrentDiagnosisState extends State<CurrentDiagnosis> {
break; break;
case SoapDetailItemActions.RESOLVE: case SoapDetailItemActions.RESOLVE:
if (widget.currentDiagnosisItems[index] if (widget.currentDiagnosisItems[index]
.status == .status ==
"Deleted") { "Deleted") {
DrAppToastMsg.showErrorToast(TranslationBase.of(context).diagnosisAlreadyDeleted); DrAppToastMsg.showErrorToast(
TranslationBase.of(context)
.diagnosisAlreadyDeleted);
return; return;
} }
if (widget.currentDiagnosisItems[index] if (widget.currentDiagnosisItems[index]
@ -167,25 +173,27 @@ class _CurrentDiagnosisState extends State<CurrentDiagnosis> {
if (widget.currentDiagnosisItems[index] if (widget.currentDiagnosisItems[index]
.status == .status ==
"Deleted") { "Deleted") {
DrAppToastMsg.showErrorToast(TranslationBase.of(context).diagnosisAlreadyDeleted); DrAppToastMsg.showErrorToast(
TranslationBase.of(context)
.diagnosisAlreadyDeleted);
return; return;
} }
if (widget.currentDiagnosisItems[index] if (widget.currentDiagnosisItems[index]
.resolved == .resolved ==
true) { true) {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
TranslationBase.of(context) TranslationBase.of(context)
.diagnosisAlreadyResolved); .diagnosisAlreadyResolved);
return; return;
} }
showConfirmationDialog(context, showConfirmationDialog(context,
"${TranslationBase.of(context).delete} ${TranslationBase.of(context).diagnosis}", "${TranslationBase.of(context).delete} ${TranslationBase.of(context).diagnosis}",
(remarks) { (remarks) {
widget.model.removeDiagnosis( widget.model.removeDiagnosis(
widget.patientInfo, widget.patientInfo,
widget.currentDiagnosisItems[index], widget.currentDiagnosisItems[index],
remarks); remarks);
}); });
case SoapDetailItemActions.CHANGE_STATUS: case SoapDetailItemActions.CHANGE_STATUS:
// TODO: Handle this case. // TODO: Handle this case.

@ -50,7 +50,6 @@ class _EditDiagnosisState extends State<EditDiagnosis> {
super.initState(); super.initState();
filteredSearchController.text = widget.diagnosis.selectedDisease ?? ''; filteredSearchController.text = widget.diagnosis.selectedDisease ?? '';
remarksController.text = widget.diagnosis.remarks ?? ''; remarksController.text = widget.diagnosis.remarks ?? '';
status = widget.diagnosis.condition ?? '';
selectedDiagnosisItemValue = widget.diagnosis?.diagnosisType ?? ''; selectedDiagnosisItemValue = widget.diagnosis?.diagnosisType ?? '';
} }
@ -76,22 +75,24 @@ class _EditDiagnosisState extends State<EditDiagnosis> {
this.model = model; this.model = model;
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
model.getConditionAndType(widget.patientInfo); model.getConditionAndType(widget.patientInfo);
status =
model.getConditionValue(widget.diagnosis.condition ?? '') ?? '';
}); });
}, builder: (_, model, w) { }, builder: (_, model, w) {
if (selectedDiagnosisItem == null && model.diagnosisTypeList.isNotEmpty) { if (selectedDiagnosisItem == null && model.diagnosisTypeList.isNotEmpty) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted) { if (mounted) {
setState(() { setState(() {
selectedDiagnosisItem = model.diagnosisTypeList.keys.firstWhere( selectedDiagnosisItem = model.diagnosisTypeList.keys.firstWhere(
(k) => (k) =>
model.diagnosisTypeList[k] == selectedDiagnosisItemValue, model.diagnosisTypeList[k] == selectedDiagnosisItemValue,
orElse: () => ''); orElse: () => '');
if (selectedDiagnosisItem?.isEmpty == true) if (selectedDiagnosisItem?.isEmpty == true)
selectedDiagnosisItem = null; selectedDiagnosisItem = null;
});
}
}); });
} }
});
}
return AppScaffold( return AppScaffold(
isLoading: model.state == ViewState.BusyLocal, isLoading: model.state == ViewState.BusyLocal,
isShowAppBar: true, isShowAppBar: true,
@ -126,14 +127,10 @@ class _EditDiagnosisState extends State<EditDiagnosis> {
}, },
); );
}, },
onChanged: (value) { onChanged: (value) {},
onFieldSubmitted: () {},
}, onEditingComplete: () {
onFieldSubmitted: () { if (filteredSearchController.text.isEmpty) return;
},
onEditingComplete: (){
if(filteredSearchController.text.isEmpty) return;
_onStopped(filteredSearchController.text); _onStopped(filteredSearchController.text);
}, },
suffixIcon: IconButton( suffixIcon: IconButton(
@ -143,7 +140,7 @@ class _EditDiagnosisState extends State<EditDiagnosis> {
size: 30, size: 30,
), ),
onPressed: () { onPressed: () {
if(filteredSearchController.text.isEmpty) return; if (filteredSearchController.text.isEmpty) return;
_onStopped(filteredSearchController.text); _onStopped(filteredSearchController.text);
}, },
), ),
@ -309,7 +306,8 @@ class _EditDiagnosisState extends State<EditDiagnosis> {
if (newValue != null) if (newValue != null)
setState(() { setState(() {
selectedDiagnosisItem = newValue; selectedDiagnosisItem = newValue;
selectedDiagnosisItemValue = model.diagnosisTypeList[newValue]; selectedDiagnosisItemValue =
model.diagnosisTypeList[newValue];
}); });
}, },
items: items:
@ -444,7 +442,9 @@ class _EditDiagnosisState extends State<EditDiagnosis> {
if (filteredSearchController.text == if (filteredSearchController.text ==
widget.diagnosis.selectedDisease && widget.diagnosis.selectedDisease &&
status.toLowerCase() == widget.diagnosis.condition?.toLowerCase() && status.toLowerCase() ==
widget.diagnosis.condition
?.toLowerCase() &&
widget.diagnosis.diagnosisType == widget.diagnosis.diagnosisType ==
selectedDiagnosisItemValue && selectedDiagnosisItemValue &&
widget.diagnosis.remarks == widget.diagnosis.remarks ==
@ -456,13 +456,12 @@ class _EditDiagnosisState extends State<EditDiagnosis> {
} }
widget.diagnosis.selectedDisease = widget.diagnosis.selectedDisease =
filteredSearchController.text; filteredSearchController.text;
widget.diagnosis.remarks = widget.diagnosis.remarks = remarksController.text;
remarksController.text; widget.diagnosis.condition = model.getConditionID(status);
widget.diagnosis.condition = status;
widget.diagnosis.diagnosisType = widget.diagnosis.diagnosisType =
selectedDiagnosisItemValue; selectedDiagnosisItemValue;
if(selectedDiagnosis != null ) { if (selectedDiagnosis != null) {
widget.diagnosis.selectedCategoryCode = widget.diagnosis.selectedCategoryCode =
selectedDiagnosis?.selectedCategoryCode ?? selectedDiagnosis?.selectedCategoryCode ??
''; '';

@ -36,9 +36,9 @@ class ListOfExamination extends StatelessWidget {
); );
} }
String? getCondition(int condition, BuildContext context) => condition ==0 String? getCondition(int condition, BuildContext context) => condition == 1
? TranslationBase.of(context).normal ? TranslationBase.of(context).normal
: condition == 1 : condition == 2
? TranslationBase.of(context).abnormal ? TranslationBase.of(context).abnormal
: TranslationBase.of(context).notExamined; : TranslationBase.of(context).notExamined;
} }

@ -73,8 +73,9 @@ class _AddChiefComplaintState extends State<AddChiefComplaint> {
SizedBox(height: 16,), SizedBox(height: 16,),
PreviousChiefComplaints( PreviousChiefComplaints(
model.episodeByChiefComplaintListVidaPlus, model.episodeByChiefComplaintListVidaPlus,
(ChiefComplains , String){ (chiefComplains , String){
addChiefComplaint(model, ChiefComplains.chiefComplain??'', context); var listOfChiefComplaint = [chiefComplains];
createCCByEpisode(model,listOfChiefComplaint );
}, },
) )
], ],

@ -8,7 +8,7 @@ import 'package:quiver/time.dart';
class PreviousChiefComplaints extends StatelessWidget { class PreviousChiefComplaints extends StatelessWidget {
final List<EpisodeByChiefComplaintVidaPlus> complaints; final List<EpisodeByChiefComplaintVidaPlus> complaints;
final Function(ChiefComplains , String)? onSendClicked; final Function(PatientPomrs , String)? onSendClicked;
PreviousChiefComplaints( PreviousChiefComplaints(
this.complaints, this.complaints,
@ -104,8 +104,6 @@ class PreviousChiefComplaints extends StatelessWidget {
onSendClicked!( onSendClicked!(
complaints[index] complaints[index]
.patientPomrs![pomrID] .patientPomrs![pomrID]
.chiefComplains![
cheifComplainIndex]
,complaints[index] ,complaints[index]
.patientPomrs?[pomrID].chiefComplainTemplateId?.toString() ??''); .patientPomrs?[pomrID].chiefComplainTemplateId?.toString() ??'');
}); });

@ -5,7 +5,6 @@
import FlutterMacOS import FlutterMacOS
import Foundation import Foundation
import cloud_firestore
import connectivity_macos import connectivity_macos
import firebase_analytics import firebase_analytics
import firebase_core import firebase_core
@ -15,11 +14,10 @@ import maps_launcher
import path_provider_foundation import path_provider_foundation
import shared_preferences_foundation import shared_preferences_foundation
import speech_to_text_macos import speech_to_text_macos
import sqflite_darwin import sqflite
import url_launcher_macos import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin"))
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
FLTFirebaseAnalyticsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAnalyticsPlugin")) FLTFirebaseAnalyticsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAnalyticsPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))

Loading…
Cancel
Save