Hello All. Complete newbie here. Spent some ti...
# dev
b
Hello All. Complete newbie here. Spent some time browsing the code. Nice work! I was wondering if there is a section in the documentation about how to add new resources. For my use cases they would be ResearchStudy, ResearchSubject and DocumentReference
n
With the SDK, you can use
createResource
https://www.medplum.com/docs/sdk/core.medplumclient.createresource In the Medplum UI, you can also create resources by navigating to
https://app.medplum.com/{resourceName}
i.e. https://app.medplum.com/ResearchStudy and clicking the
New...
button at the top of the table with all of the actions
b
Sweet. thank you
r
Are you part of a research organization @brian?
b
Thanks. I was able to quickly create a bundle and upload it. The https://app.medplum.com/{resourceName} technique worked. However, it appeared that the Bundle was processed correctly. But, when I went to https://app.medplum.com/ResearchSubject there was no data. Also, is there a way on BundleEntry POST to preserve the resource.id if it was provided? I noticed the system overwrote the provided ids.
Yes I work for OHSU Oregon Health and Science University
r
Hi Brian, if you are uploading a FHIR bundle with multiple resources, you can use our batch upload tool: https://www.medplum.com/docs/tutorials/importing-sample-data
b
Thanks. That is exactly how I uploaded the Bundle. On closer examination, It looks as if you guys might be using R4B, the ResearchSubject structure changed with 5.0, that's why the ResearchSubjects weren't being created.
I've fixed that now.
>Also, is there a way on BundleEntry POST to preserve the resource.id if it was provided? I noticed the system overwrote the provided ids. I was hoping there might be an option to preserve the ids. I understand that the PUT option will create the resource and preserves ids even if the resource didn't exist already. When I attempt that via the Bundle, the system responds with, "404"
166 Views