Reverse sync chief complaints of the patient#15
Conversation
src/main/java/com/iemr/hwc/fhir/config/fhirRestfulServer/FhirRestfulServer.java
Show resolved
Hide resolved
src/main/java/com/iemr/hwc/fhir/provider/condition/ConditionExtProvider.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Apart from the imports and auto wiring, I don't see any changes here. Undo this as well.
There was a problem hiding this comment.
Since this logic is related to the condition controller, it's better to write it in the condition service class(already present). That way our code will be better isolated from theirs and easy to follow and we will not be modifying their code.
| condition.setBenFlowID(new StringType(beneficiaryFlowStatus.getBenFlowID()+"")); | ||
| } | ||
| else { | ||
| throw new ResourceNotFoundException("No record found for given benVisitID and BenVisitCode"); |
There was a problem hiding this comment.
Instead of throwing exception, log it as no benVisitID and BenvisitCode. Add continue statement to ignore the record. Can we write in the query to get only records with benVistiID and BenvisitCode?
There was a problem hiding this comment.
I even think that we don't need to generate an exception because the benVisitID and the visitCode will exist all the time. So I removed the generation of an exception @roopesh-beehyv
For testing:
http://{{baseUrl}}:{{port}}/fhir/Condition?providerServiceMapId=10&vanID=3&lastModif=lt2023-08-01
Curl:
curl --location 'http://{{baseUrl}}:{{port}}/fhir/Condition?providerServiceMapId=10&vanID=3&lastModif=lt2023-08-01'
--header 'Accept: application/json'