-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Use Case
As an ACED data submitter, when I've submitted data (see #9), I need to know the details of the Bundle contents and how the bundle will be processed.
Bundle object implementation notes
-
GET Bundle/[id] is NOT implemented at this time, should processing time become an issue we may return a 201 from the POST to allow the client to query for completion via GET
-
Rule: The only methods support for each entry.request.methods is PUT (upsert) and DELETE
-
Rule: For collections of type transaction or batch, all entries must contain request elements, and resources if the entry.request.methods is PUT,
POST or PATCH -
The only type supported is transaction, transaction-response
-
The ACED data model is a subset of the FHIR model, the server MUST reject the transaction if an unsupported resource is included. e.g. A Claim resource is included.
-
The client MUST interrogate the bundle response for individual entry response.status for standard result codes
role-based access control (RBAC)
- The server MUST reject all requests without a Authorization header
- The bundle MUST have an Identifier system=https://aced-idp.org/project_id value=$PROGRAM-$PROJECT
- The server MUST interrogate Arborist to validate submission rights see existing fhir_import job
Bundle processing
- check authz
- create Bundle file
- delegate: launch fhir import, modified to support Bundle
- for DELETE transactions - remove from fhir_store, flat store, etc.
- for all others - create .ndjson - process as usual
as is
issues
- Semantics of fullUrl: only ids of form urn:uuid:XXXXX will be supported
- Each entry request should include the url
[type]?identifier=$system|$valuee.g. Patient?identifier=http:/example.org/fhir/ids|456456 - All resources should include an identifier - that identifier MUST not include PHI
- In order to prevent "schema explosion" 🤯, the openapi
component/schema/definitions are minimal representations of [Bundle, Bundle_Entry, Bundle_Request, Bundle_Response]. iceberg_tools will validate using complete R5
valid resource types
- ResearchStudy
- Patient
- ResearchSubject
- Substance
- Specimen
- Observation
- Condition
- Medication
- MedicationAdministration
- DocumentReference
- Task
- FamilyMemberHistory
examples
THIS IS STILL A DRAFT
-
example openapi : see docs/openapi.yaml
-
example bundle
---
resourceType: Bundle
id: bundle-transaction
type: transaction
entry:
- fullUrl: urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f0a
resource:
resourceType: Patient
active: true
name:
- use: official
family: Chalmers
given:
- Peter
- James
gender: male
birthDate: '1974-12-25'
request:
method: POST
url: Patient
- fullUrl: http://example.org/fhir/Patient/123
resource:
resourceType: Patient
id: '123'
active: true
name:
- use: official
family: Chalmers
given:
- Peter
- James
gender: male
birthDate: '1974-12-25'
request:
method: PUT
- fullUrl: urn:uuid:74891afc-ed52-42a2-bcd7-f13d9b60f096
resource:
resourceType: Patient
identifier:
- system: http:/example.org/fhir/ids
value: '456456'
active: true
name:
- use: official
family: Chalmers
given:
- Peter
- James
gender: male
birthDate: '1974-12-25'
request:
method: PUT
url: Patient?identifier=http:/example.org/fhir/ids|456456
- fullUrl: http://example.org/fhir/Patient/123a
resource:
resourceType: Patient
id: 123a
text:
status: generated
div: <div xmlns="http://www.w3.org/1999/xhtml">Some narrative</div>
active: true
name:
- use: official
family: Chalmers
given:
- Peter
- James
gender: male
birthDate: '1974-12-25'
request:
method: PUT
url: Patient/123a
ifMatch: W/"2"
- request:
method: DELETE
url: Patient/234
- request:
method: DELETE
url: Patient?identifier=123456
