I’m new to EHRBase and use docker images to learn EHRbase. According to the document, I have successfully performed the first three steps of “2. Getting Started” (including Data Models, Upload a Template and Create an EHR) .
When trying Step 4: Load Data:
I firstly built the Client Library from “GitHub - nedap/ehrbase_client_library”. But when I tried to create the Java classes from the OPT, “nullPointerException” was reported. It seems that the Client Library cannot correctly analysis the OPT. Also it seems that “/nedap/ehrbase_client_library” is no longer maintained.
Then, I tried to use Flat Format. I tried to send request to “/ehrbase/rest/ecis/v1/composition” according to the “Flat.postman_collection” and the document. but it returned “‘error’: ‘Bad Request’”. So I wonder if there is a detailed document for the API endpoints for the Flat Format to help me use the APIs properly?
Hi @daguanyu you can use the openEHR Toolkit to generate a JSON based on your operational template (OPT) and just send a POST request to EHRBASE with that payload.
The toolkit generates a COMPOSITION with random data based on your template. Then, if you want, you can change some values manually of via software, then commit the composition.
For me (I do a lot of testing) it’s the fastest way of having some data loaded for testing.