Application Name: Reference Application
Version Number: 2.13.0-SNAPSHOT (OpenMRS version 2.6.0 SNAPSHOT Build 0)
FHIR2 Module Version: 1.6.0-SNAPSHOT
Hi, I’m trying to POST an Encounter ressource through the FHIR2 module API and I am unable to do so. So far, I’ve been able to POST both visits(on the /Encounter route) and Observation ressources, but not Encounter. I’m also able to GET Encounter (those I created through the application’s frontend), Patient, Observation and visits. I am sure that both my subject (patient) and partOf (visit) references exist in my database.
Error I’m receiving: Failed to call access method: org.hibernate.exception.ConstraintViolationException: could not execute statement
Request Body : https://pastebin.com/WwZYsjVx
In the log I can see : “Caused by: java.sql.SQLIntegrityConstraintViolationException: Column ‘encounter_id’ cannot be null” That seems pretty weird to me, as the id should be created by the back end and not be specified in my json body.
Thanks in advance