Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submission Service #2

Closed
bwalsh opened this issue Oct 26, 2023 · 1 comment
Closed

Submission Service #2

bwalsh opened this issue Oct 26, 2023 · 1 comment

Comments

@bwalsh
Copy link
Collaborator

bwalsh commented Oct 26, 2023

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. The update interaction creates a new current version for an existing resource or creates an initial version if no resource already exists for the given id. The update interaction is performed by an HTTP PUT command, in effect an upsert

implementation notes

  • Rule: For collections of type transaction or batch, all entries must contain request elements, and resources if the method is POST, PUT or PATCH

  • The only type supported is transaction

  • The ACED data model is a subset of the FHIR model, the server may reject the transaction if an unsupported resource is included. e.g. A Claim resource is included.

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

examples

THIS IS STILL A DRAFT

  • example openapi
openapi: 3.0.1
info:
  title: ACED Submission
  contact: {}
  version: 0.0.1
servers:
- url: https://aced-idp.org/Bundle
  description: ACED FHIR Bundle Implementtion
  /Bundle:
   post:
      tags:
      - Bundle
      summary: "create-type: Create a new Bundle instance"
      requestBody:
        content:
          application/fhir+json:
            schema:
              $ref: '#/components/schemas/Bundle'.  # type=transaction
            example: |-
              {
                "resourceType": "Bundle"
              }
      responses:
        "200":
          description: Success
          content:
            application/fhir+json:
              schema:
                $ref: '#/components/schemas/Bundle'. # type=transaction-response
              example: null
components:
  schemas:
    Bundle:  # see https://hl7.org/fhir/R5/bundle.schema.json.html 
  • 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
@bwalsh
Copy link
Collaborator Author

bwalsh commented Oct 26, 2023

Moved to ACED-IDP/submission#9

@bwalsh bwalsh closed this as completed Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant