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