Stream: implementers
Topic: Receive and process documents
Patricia Alves (May 09 2016 at 12:08):
Hi, can you give me some recommendations on how to receive a document sent by an application to a Mirth server. For example, I need to be able to receive on my server a document bundle, validate it and then send it to another server on an institution (final destination). To do so, the sending client should post the document to my server using which operation?
I have read this page (http://www.hl7.org/fhir/operations.html), but I can't find an example for my situation. Thank you very much.
Matthew Spielman (May 09 2016 at 12:34):
*disregard*
I asked Grahame in person, will post his answer for the sake of anyone else trying to do the same.
Grahame Grieve (May 09 2016 at 12:35):
Pat - there is no API that exposes these particular obligations. Your client could iterate the operations to do this, but if you want the server to do this, you'll have to create your own operation that has those obligations as part of it's description
Kevin Mayfield (May 09 2016 at 12:36):
I use a Bundle resource to move documents around. The Bundle contains a DocumentReference and a Binary resource and is POSTed to the endpoint url.
Kevin Mayfield (May 09 2016 at 12:40):
@Matthew Spielman When I've been moving Documents around I've included the referenced resources and made the references self referential (does that make sense - the references point internally to the main resource ). It's a bit a pain when the references are well known (e.g. national doctor id or national patient identifier).
Patricia Alves (May 09 2016 at 13:44):
Thank you for your anwers. Grahame maybe I'll create my own operation (like $process-document),
or, Kevin you say you use a bundle of type message that references the documentReference in the messageheader.data? Can I use a bundle of type message and include a reference to my document bundle in the messageheader.data?
Grahame Grieve (May 09 2016 at 14:13):
yes, and put the document bundle inside the message bunle
Patricia Alves (May 09 2016 at 14:35):
Thank you very much, I'll do that :)
Christiaan Knaap (Jun 29 2016 at 10:51):
Who should set the bundle.id on a document? It is mandatory, but if you post it to a server, it is not allowed to have a value.
To make it more complex: In our situation we will have a system that assembles a document bundle and will post it to two different servers (like one in CC, since they can probably not retrieve it from each other). So we want the constructor (our system) to assign the id (probably a guid). But that should not be accepted on the server when we POST it to <server>/Bundle.
Grahame Grieve (Jun 29 2016 at 13:47):
I don't think you can post to /bundle
David Hay (Jun 29 2016 at 17:49):
according to the spec(http://hl7-fhir.github.io/documents.html#bundle): This works like a normal end-point for managing a type of resource, but it works with whole document bundles - i.e. a read operation returns a bundle, an update gets a bundle and a search returns a bundle of bundles - I took that to mean you could store a document there...
Grahame Grieve (Jun 29 2016 at 21:39):
right, you can. but not POST, you'll have to PUT
David Hay (Jun 30 2016 at 03:20):
Interesting. Why the difference? What id do you use?
Grahame Grieve (Jun 30 2016 at 03:32):
because the id is fixed for a document, and the server can't reassign it
David Hay (Jun 30 2016 at 03:35):
Gotcha. The id to use is the document id. makes sense - thanks...
Christiaan Knaap (Jul 04 2016 at 09:54):
Thanks. Added a gForge tracker item to clarify this in the spec.
Last updated: Apr 12 2022 at 19:14 UTC