Hi All..I'm new to MedPlum, but very excited about...
# general
b
Hi All..I'm new to MedPlum, but very excited about its potential. I'm trying to mock up a use case for Anatomic Pathology Lab, and was attempting to load a sample bundle from HL7 specs. (https://hl7.org/fhir/us/cancer-reporting/STU1/Bundle-us-pathology-content-bundle-example.json.html) I get an
Unrecognized bundle
error, but the
collection
type appears to be supported in medplum docs (https://www.medplum.com/docs/api/fhir/resources/bundle). Does anyone have any suggestions? Or does anyone know of some decent Anatomic Pathology sample data that works for MedPlum FHIR?
m
Hi @bnapora — welcome! The FHIR spec for batch (http://hl7.org/fhir/R4/http.html#transaction) fixes the Bundle type as either "batch" or "transaction"; otherwise, without the
Bundle.entry.request
fields populated for each resource in the Bundle, the server wouldn't be able to tell if you intended to create that resource new or update an existing one
I think it should work if you change the
Bundle.type
to "batch" and then add to each
Bundle.entry
e.g.
Copy code
"request": {
  "method": "POST",
  "url": "/Patient"
}
r
To expand on @medplummatt 's answer. FHIR has a number of different bundle types, some of which are INPUT bundles (meant for machines to read and process), and some are OUTPUT bundles (meant for humans / applications to consume). They have slightly different formatting, and are distinguished by the
Bundle.type
field.
Unfortunately, the bundle of Anatomic Pathology sample data you linked is in an output format, and would require some conversion before upload
However, we do have a repository that we built for implementing the CDC medmorph guidelines, with some input bundles of pathology related data. These might be of use: https://github.com/medplum/cdc-medmorph/tree/main/pathologyFormExamples
b
@medplummatt I made the change you suggested (there were only 11 entries 🙂 and batch imported partially. I'll have to do a bit more troubleshooting. Thanks for the tip.
@rahul1 I appreciate the follow-up. I took a look at the "medmorph" same data. I was able to load the "Output" bundle but when looking at the asssociated "DiagnosticReport" (which is a structured path report), none of the "Observations" appeared to load. (At least when I loaded through the MedPlum App "Batch" upload UI. On a related note, is the
Bundle.type
field for Input generally
collection
or
transaction
(as the sample I provided or the input bundles in your repo?)
r
input is typically
transaction
or
batch
Do you mind letting me know which bundle has issues wiht the Observations? I can try to debug
Also just FYI, we love seeing these kinds of questions in our #1094022380659155005 channel. It makes it easier for other community members to find answers to similar topics
b
I loaded all 3 of the sample JSON in the repo prefixed with "Bundle-..." (According to the README, the
MsgBundle_ColorectalBx.json
should be the Outut.
r
ok - I can take a look later today to debug what may be happening with the Observation resources on those bundles. They are expected to be created properly
b
The result in my Medplum CDR was 3 seperate patients (Rosa Gonzalez) and 3 seperate
Pathology Synoptic report
. Each instance of the report showed
Not found
when selecting a report.
All my interaction has been through Medplum App, with JSON uploaded through "Batch" admin screen.
I also looked at one of the patient instances in the FooMedical app and it didn't show any Diagnostic Report. Thanks for the help.
r
Would you mind sharing a link to one of your DiagnosticReports from app.medplum.com? It will help me diagnose 🙂
b
All my initial experiments have been on a localhost instance of Medplum. I just added
MsgBundle_ColorectalBx.json
to my project instance in app.medplum.com, and get similar results. Here is example DiagnosticsReport: https://app.medplum.com/DiagnosticReport/2df3ec9b-6001-454f-b5b4-a125c8507514 (Interestingly, when I loaded the bundles through batch in this instance, the Patient resource errored out, althought the DiagnosticReport resources were created.)
r
@bnapora , I believe I have diagnosed the problem. It seems like the bundle creates the resource out of order. Because batch processing occurs top to bottom,, the bundle should first create the
Observations
, then the
DiagnosticReport
that references them. I can reorder these three bundles and publish an updated version by tomorrow morning, would that work for you?
b
Great...appreciate the help. Do you have an idea where I might find any additional Path Report sample data?
I'm taking a look at MedPlum as a potential component of a Digital Pathology Workflow app. So, I'm primarily interested in Tasks, DiagnosticReports and Images.
r
@alexkg - do you have any intel on Path Report sample data? You are the most expert person I can think of on this topic 🙂
a
For sure! We've got some test data here: https://github.com/IHE-SDC-WG/ConnectathonSampleData/tree/main. No images or tasks, only bundles with DiagnosticReports Here are some more in that repo: https://github.com/IHE-SDC-WG/ConnectathonSampleData/tree/main/fsh-generated/resources
The sample data was created based on the CAP electronic Cancer protocols: https://www.cap.org/protocols-and-guidelines/electronic-cancer-protocols
Oh this is good to know.
r
For Tasks, we don't have sample data readily available, but we do have some guides related to tasks: https://www.medplum.com/docs/careplans/tasks https://www.medplum.com/blog/task-management-apps https://www.medplum.com/docs/api/fhir/resources/task
b
@alexkg Thanks for the tip on that sample data. I'll check it out.
@rahul1 I've checked out those MedPlum resources on tasks. The sample app is nice demo of what might be possible. Using tasks with other resource types (eg DiagnosticReport) looks like the path I'll need to go down.
r
@bnapora I just wanted to let you know we are upgrading our batch upload tool, such that you should be able to upload your OUTPUT anatomic pathology bundle as is. The feature is still in review, but I'll let you know when it is merged https://github.com/medplum/medplum/pull/2522
b
@rahul1 Good news... I look forward to trying it out. I was able to cobble together some bundles, but would be nice to injest Fhir standard examples into Medplum as well. Any update on fixing the Medplum sample bundles from the repo you sent me? Will those work with this fix?
r
@alexkg and team are the original authors of the bundles in this repo https://github.com/medplum/cdc-medmorph - but they will probably not work with this fix. Perhaps others from Alex's sample repos will be ok? I haven't yet tried them https://github.com/IHE-SDC-WG/ConnectathonSampleData/tree/main/fsh-generated/resources
a
Does this batch issue affect transaction bundles too? If not then they can be used, if yes then they need to have the observations above the DiagnosticReport
r
r
@bnapora Sory for th eslow follow up, but I wated to let you know that this change has been merged! You can try uploading your bundle again using the batch update tool
b
Great. I will test out tomorrow. Thx for the update?