Building on the Platform
...
Solutions
Document Exchange
Upload Document
5 min
the founda health platform allows applications to upload/publish documents to the ehr of a hospital this interaction allows medical devices or applications that are generating reports like questionnaires, directly into the patient's ehr profile the upload document interaction with the founda platform is based on the ihe mhd profile an application can use the iti 65 transaction to upload a document, that has to comply with the mhd minimal provide document bundle resource profile the profile parameter should be included in the payload that is being send to the endpoint how to include the profile url in the request body { "meta" { "profile" \[ "https //profiles ihe net/iti/mhd/structuredefinition/ihe mhd minimal providebundle" ] } } interaction a document can be published with a post request to the base fhir endpoint http //api \<region> founda com/1/health/organizations/\<org x>/fhir/4/ depending on the sandbox testing docid\ ncff15xnu1wglst2wnm p you are in the fhir bundle for this profile is expected to be of type transaction and is expected to include a minimal set of fhir resources one list resource modelled after an ihe xds submissionset one documentreference resource modelled after an ihe xds documententry one binary resource containing the actual document to be uploaded one patient resource containing the patient demographics that is the subject of the actual document one or more fhir resources referenced by the documentreference context for more details on the fhir bundle definition please see the formal views of profile content in the ihe mhd profile in order to format your bundle correctly, you can use the example resource payload in the file below https //archbee doc uploads s3 amazonaws com/qsnsu06vco6yg7tb9kmld/17n3tf vhf0ya t5mntc iti 65 minimal document provide bundle json to be able to publish a document, the client you are using has to be authorized to publish a bundle of type transaction this can be requested and set up by applications in the client management docid\ vuyhchkpc7qgzohtfjwzk section of the console example api call curl location 'https //api eu founda com/1/health/organizations/org 4c5739ba994d4ce9b5255d3f84a2d367/fhir/4/' \\ \ header 'content type application/json' \\ \ header 'authorization bearer ory at xaaz7fdz2xslsfxkih 5i0ksfvulh0q fbtlkm0 vn0 geizjjeig4p5nmypcudffmhhbemu6d 54ovy8k41v 0' \\ \ data '{ "resourcetype" "bundle", "meta" { "profile" \[ "https //profiles ihe net/iti/mhd/structuredefinition/ihe mhd minimal providebundle" ] }, "type" "transaction", "timestamp" "2023 04 21t08 19 13+00 00", "entry" \[ { "fullurl" "urn\ uuid\ d7385c46 f683 4d8d a167 a92478b39a18", "resource" { "resourcetype" "list", "id" "d7385c46 f683 4d8d a167 a92478b39a18", "meta" { "profile" \[ "https //profiles ihe net/iti/mhd/structuredefinition/ihe mhd minimal submissionset" ] }, "extension" \[ { "url" "https //profiles ihe net/iti/mhd/structuredefinition/ihe sourceid", "valueidentifier" { "value" "urn\ oid 1 2 3 4" } } ], "status" "current", "mode" "working", "code" { "coding" \[ { "system" "https //profiles ihe net/iti/mhd/codesystem/mhdlisttypes", "code" "submissionset" } ] }, "subject" { "reference" "urn\ uuid 2b405ca5 d290 41cf 9354 9eb039120c14" }, "date" "2023 04 21t08 19 13+00 00", "entry" \[ { "item" { "reference" "urn\ uuid\ aa1c1684 e14f 4785 99b7 71c5d88a4e1d" } } ] }, "request" { "method" "post", "url" "list" } }, { "fullurl" "urn\ uuid\ aa1c1684 e14f 4785 99b7 71c5d88a4e1d", "resource" { "resourcetype" "documentreference", "id" "aa1c1684 e14f 4785 99b7 71c5d88a4e1d", "meta" { "profile" \[ "https //profiles ihe net/iti/mhd/structuredefinition/ihe mhd minimal documentreference" ] }, "masteridentifier" { "system" "http //www somedomain com/masteridentifier", "value" "4334" }, "status" "current", "subject" { "reference" "urn\ uuid 2b405ca5 d290 41cf 9354 9eb039120c14" }, "content" \[ { "attachment" { "creation" "2023 04 27t08 19 13+00 00", "contenttype" "application/pdf", "url" "urn\ uuid 1c89145a d172 4a51 9a02 3e88aba802ae" } } ], "author" \[ { "type" "device", "identifier" { "system" "http //www somedomain com/device", "value" "devicename" } } ], "context" { "encounter" \[ { "reference" "urn\ uuid 1837d6b3 4096 4d1b 8574 875d3131bff9" } ], "event" \[ { "coding" \[ { "display" "some clincial event", "system" "http //www somedomain com/event codes", "code" "47" } ], "text" "free text related to this event" } ], "period" { "start" "2023 04 20t12 28 24 000000z", "end" "2023 04 20t12 29 17 000000z" }, "practicesetting" { "coding" \[ { "system" "http //www somedomain/com/practice setting", "code" "car", "display" "cardiology" } ], "text" "free text related to this practice setting" } } }, "request" { "method" "post", "url" "documentreference" } }, { "fullurl" "urn\ uuid 2b405ca5 d290 41cf 9354 9eb039120c14", "resource" { "resourcetype" "patient", "id" "2b405ca5 d290 41cf 9354 9eb039120c14", "identifier" \[ { "use" "usual", "type" { "coding" \[ { "system" "http //terminology hl7 org/codesystem/v2 0203", "code" "mr" } ] }, "system" "http //www somedomain com/assigning authority", "value" "09869613" } ], "name" \[ { "family" "familyname", "given" \[ "firstname" ] } ] }, "request" { "method" "post", "url" "patient" } }, { "fullurl" "urn\ uuid 1837d6b3 4096 4d1b 8574 875d3131bff9", "resource" { "resourcetype" "encounter", "id" "1837d6b3 4096 4d1b 8574 875d3131bff9", "status" "finished", "basedon" \[ { "reference" "urn\ uuid\ f450732c 3b0b 49d9 a69b b788f54e48ba" } ], "class" { "system" "http //terminology hl7 org/codesystem/v3 actcode", "code" "imp", "display" "inpatient encounter" }, "subject" { "reference" "urn\ uuid 2b405ca5 d290 41cf 9354 9eb039120c14" }, "identifier" \[ { "use" "official", "system" "http //www somedomain com/patient identifier", "value" "123456789" } ], "reasonreference" \[ { "reference" "urn\ uuid\ c55b6f85 4b04 482a b25f a1c703728adb" } ], "period" { "start" "2023 04 20" } }, "request" { "method" "post", "url" "encounter" } }, { "fullurl" "urn\ uuid\ f450732c 3b0b 49d9 a69b b788f54e48ba", "resource" { "resourcetype" "servicerequest", "subject" { "reference" "urn\ uuid 2b405ca5 d290 41cf 9354 9eb039120c14" }, "status" "active", "intent" "proposal", "code" { "coding" \[ { "system" "http //www somedomain com/procedure code", "code" "722009" } ], "text" "free text related to this procedure" }, "identifier" \[ { "use" "usual", "type" { "coding" \[ { "system" "http //terminology hl7 org/codesystem/v2 0203", "code" "plac" } ] }, "system" "http //www somedomain com/placer order number", "value" "p12345" }, { "type" { "coding" \[ { "system" "http //terminology hl7 org/codesystem/v2 0203", "code" "fill" } ] }, "system" "http //www somedomain com/filler order number", "value" "f12345" } ] }, "request" { "method" "post", "url" "servicerequest" } }, { "fullurl" "urn\ uuid\ c55b6f85 4b04 482a b25f a1c703728adb", "resource" { "resourcetype" "procedure", "id" "c55b6f85 4b04 482a b25f a1c703728adb", "status" "completed", "performeddatetime" "2023 04 21", "subject" { "reference" "urn\ uuid 2b405ca5 d290 41cf 9354 9eb039120c14" }, "bodysite" \[ { "coding" \[ { "display" "left side", "system" "http //www somedomain com/body site", "code" "left" } ] } ] }, "request" { "method" "post", "url" "procedure" } }, { "fullurl" "urn\ uuid 1c89145a d172 4a51 9a02 3e88aba802ae", "resource" { "resourcetype" "binary", "id" "1c89145a d172 4a51 9a02 3e88aba802ae", "contenttype" "application/pdf", "data" "jvberi0x " }, "request" { "method" "post", "url" "binary" } } ] } '{ "resourcetype" "bundle", "id" "e135d3df 6b50 4f7c b6bf c10fec4b1149", "type" "transaction response", "link" \[ { "relation" "self", "url" "https //api eu founda com/1/health/organizations/org 4c5739ba994d4ce9b5255d3f84a2d367/fhir/4/" } ], "entry" \[ { "response" { "status" "201 created", "location" "list/2224/ history/1", "etag" "1", "lastmodified" "2023 10 16t13 20 04 942+00 00" } }, { "response" { "status" "201 created", "location" "documentreference/2225/ history/1", "etag" "1", "lastmodified" "2023 10 16t13 20 04 942+00 00" } }, { "response" { "status" "201 created", "location" "patient/2226/ history/1", "etag" "1", "lastmodified" "2023 10 16t13 20 04 942+00 00" } }, { "response" { "status" "201 created", "location" "encounter/2227/ history/1", "etag" "1", "lastmodified" "2023 10 16t13 20 04 942+00 00" } }, { "response" { "status" "201 created", "location" "servicerequest/2228/ history/1", "etag" "1", "lastmodified" "2023 10 16t13 20 04 942+00 00" } }, { "response" { "status" "201 created", "location" "procedure/2229/ history/1", "etag" "1", "lastmodified" "2023 10 16t13 20 04 942+00 00" } }, { "response" { "status" "201 created", "location" "binary/2230/ history/1", "etag" "1", "lastmodified" "2023 10 16t13 20 04 942+00 00" } } ] }