Skip to content

Submission

Brian edited this page Oct 29, 2023 · 1 revision

use case

As a ACED developer, in order to submit and maintain meta data, it would be useful to have an openapi defined service to allow server and client side engineers to develop services.

summary

Implement a very narrow subset of the FHIR REST API. i.e. POST [base]/Bundle

dependences

  • FHIR bundle. Creating/updating/deleting a set of resources on a server as a single operation
  • REST endpoint. For each entry in the bundle, the interaction creates a new current version for an existing resource or creates an initial version if no resource already exists for the given id.

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

issues

  • Semantics of fullUrl: only ids of form urn:uuid:XXXXX will be supported
  • Each entry request should include the url [type]?identifier=$system|$value e.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
Clone this wiki locally