Excerpt |
---|
The Service, Support & Logistics Domain API. |
Swagger open api macro
openapi: 3.0.0
info:
title: eHealth SSL Order service
version: 1.0.0
description: eHealth SSL Order service
termsOfService: http://ehealth.sundhed.dk/terms/
license:
name: Proprietary
contact:
name: Systematic A/S
url: https://systematic.com/
email: support.ehealth.servicedesk@systematic.com
externalDocs:
description: eHealth documentation
url: http://ehealth-documentation.s3-website-eu-west-1.amazonaws.com/
tags:
- name: order
description: Operations with orders
- name: order line
description: Operations with order lines
- name: trace line
description: Operations with trace lines
- name: Party
description: Operations with parties
- name: Contract
description: Operations with contracts
security:
- bearerAuth: []
paths:
/party:
post:
tags:
- Party
summary: Create new Party
description: Create new Party
operationId: createParty
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/Party"
description: Party which should be created.
required: true
responses:
"201":
description: The Party was successfully created
headers:
location:
description: The location of the newly created Party.
schema:
type: string
format: uri
"400":
description: Invalid input
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Illegal state changes are attempted.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
put:
tags:
- Party
summary: Update Party
description: Update Party
operationId: updateParty
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/Party"
description: Party with data to update
required: true
responses:
"204":
description: The Party was successfully updated
"400":
description: Invalid input
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"404":
description: Party not found
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
get:
tags:
- Party
summary: Search parties by parameters
description: Search parties by parameters
operationId: getParties
parameters:
- name: name
in: query
description: Multiple name values can be provided
explode: true
schema:
type: array
items:
type: string
pattern: ^(?!\s*$).+
- name: role
in: query
description: Multiple role values can be provided
explode: true
schema:
type: array
items:
type: string
enum:
- ACCOUNTING
- BUYER
- SELLER
responses:
"200":
description: List of Parties was successfully returned
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Party"
"400":
description: Invalid input
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"/party/{id}":
get:
tags:
- Party
summary: Return Party by id
description: Return Party by id
operationId: getPartyById
parameters:
- name: id
in: path
description: Id of Party
required: true
schema:
type: string
responses:
"200":
description: The Party was successfully returned
content:
application/json:
schema:
$ref: "#/components/schemas/Party"
"400":
description: Invalid input
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"404":
description: Party not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/contract:
post:
tags:
- Contract
summary: Create new Contract
description: Create new Contract
operationId: createContract
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/Contract"
description: Contract which should be created
required: true
responses:
"201":
description: The Contract was successfully created
headers:
location:
description: The location of the newly created Contract
schema:
type: string
format: uri
"400":
description: Invalid input
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
get:
tags:
- Contract
summary: Search for Contracts by parameters
description: Search for Contracts by parameters
operationId: getContracts
parameters:
- name: seller
in: query
description: Single seller reference can be provided
schema:
type: string
- name: account
in: query
description: Single account reference can be provided
schema:
type: string
- name: buyer
in: query
description: Single buyer reference can be provided
schema:
type: string
responses:
"200":
description: List of Contracts was successfully returned
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Contract"
"400":
description: Invalid input
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"/contract/{id}":
get:
tags:
- Contract
summary: Return Contract by id
description: Return Contract by id
operationId: getContractById
parameters:
- name: id
in: path
description: Id of Contract
required: true
schema:
type: string
responses:
"200":
description: The Contract was successfully returned
content:
application/json:
schema:
$ref: "#/components/schemas/Contract"
"400":
description: Invalid input
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
# TODO: 2022-01-24 OLL This is not working - returns a 500 if used
# "403":
# description: Forbidden
# content:
# "*/*":
# schema:
# $ref: "#/components/schemas/Error"
"404":
description: Contract not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
patch:
tags:
- Contract
summary: Patch selected fields of the given contract
description: Patch selected fields of the given contract
operationId: patchContract
parameters:
- name: id
in: path
description: Id of Contract
required: true
schema:
type: string
format: uuid
requestBody:
$ref: "#/components/requestBodies/PatchRequest"
responses:
"204":
description: The contract was successfully updated.
"400":
description: Invalid input
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"404":
description: The contract was not found
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
/order:
post:
operationId: createOrder
summary: Create a new order.
tags:
- order
requestBody:
$ref: "#/components/requestBodies/Order"
responses:
"201":
description: The order was successfully created.
headers:
Location:
description: The location of the newly created Order.
schema:
type: string
format: uri
"400":
description: The request could not be understood.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
put:
summary: Update an order.
description: id property is required.
tags:
- order
operationId: updateOrder
requestBody:
$ref: "#/components/requestBodies/Order"
responses:
"204":
description: The order was successfully updated.
"400":
description: The request could not be understood.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"401":
description: User is unauthorized to change field.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"/order/{id}":
get:
operationId: getOrderById
summary: Retrieve an order
tags:
- order
parameters:
- name: id
in: path
required: true
description: The id of the order to retrieve.
schema:
type: string
responses:
"200":
description: The order was successfully retrieved.
content:
application/json:
schema:
$ref: "#/components/schemas/Order"
"400":
description: The request could not be understood
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
# TODO: 2022-01-24 OLL This is not working
# "403":
# description: Forbidden
# content:
# "*/*":
# schema:
# $ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
patch:
operationId: updatedPartialOrder
summary: Update an order partially
tags:
- order
parameters:
- name: id
in: path
required: true
description: The id of the order to update partially.
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/OrderBase"
description: The data of order to update partially.
required: true
responses:
"204":
description: The order was successfully updated.
"400":
description: The request could not be understood
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"403":
description: Illegal state changes are attempted
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
delete:
operationId: deleteOrder
summary: Delete an order
tags:
- order
parameters:
- name: id
in: path
required: true
description: The id of the order to delete.
schema:
type: string
responses:
"204":
description: The order was successfully deleted.
"400":
description: The request could not be understood
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"403":
description: Order is not in state suitable for deletion.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"/order/{id}/details":
get:
operationId: getOrderDetails
summary: Retrieve details of an order.
tags:
- order
parameters:
- name: id
in: path
required: true
description: The id of the order details to retrieve.
schema:
type: string
responses:
"200":
description: The order details were successfully retrieved.
content:
application/json:
schema:
$ref: "#/components/schemas/OrderDetails"
"400":
description: The request could not be understood
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"/order/{id}/note":
post:
operationId: createOrderNote
summary: Create new note for the order.
tags:
- order
parameters:
- name: id
in: path
required: true
description: the id of the order notes to retrieve
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/OrderNotes"
required: true
responses:
"204":
description: The OrderNotes was successfully added to order.
"400":
description: The request could not be understood
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/orders:
get:
operationId: getOrders
summary: Search orders by parameters
tags:
- order
parameters:
- name: seller
in: query
description: Multiple references to SellerSupplierParty can be provided.
explode: true
schema:
type: array
items:
type: string
- name: buyer
in: query
description: Multiple references to BuyerCustomerParty can be provided.
explode: true
schema:
type: array
items:
type: string
- name: identifier
in: query
description: Multiple identifier values like
http://ehealth.xxx.dk/somesystem|somecode can be provided.
explode: true
schema:
type: array
items:
type: string
- name: patient
in: query
description: Multiple patient refernces from clinical domain can be provided.
explode: true
schema:
type: array
items:
type: string
responses:
"200":
description: Orders were successfully retrieved.
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Order"
"400":
description: The request could not be understood
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/order-line:
post:
operationId: createOrderLine
summary: Create a new order line.
tags:
- order line
requestBody:
$ref: "#/components/requestBodies/OrderLine"
responses:
"201":
description: The order line was successfully created.
headers:
Location:
description: The location of the newly created order line.
schema:
type: string
format: uri
"400":
description: The request could not be understood.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
put:
summary: Update an order line.
description: id property is required.
tags:
- order line
operationId: updateOrderLine
requestBody:
$ref: "#/components/requestBodies/OrderLine"
responses:
"204":
description: The order line was successfully updated.
"400":
description: The request could not be understood.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"401":
description: User is unauthorized to change field.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"403":
description: Ilegal state changes are attempted.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"/order-line/{id}":
get:
operationId: getOrderLineById
summary: Retrieve an order line
tags:
- order line
parameters:
- name: id
in: path
required: true
description: The id of the order line to retrieve.
schema:
type: string
responses:
"200":
description: The order line was successfully retrieved.
content:
application/json:
schema:
$ref: "#/components/schemas/OrderLine"
"400":
description: The request could not be understood
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
# TODO: 2022-01-24 OLL This is not working
# "403":
# description: Forbidden
# content:
# "*/*":
# schema:
# $ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
patch:
tags:
- order line
summary: Patch the selected fields for a given order line
description: Patch the selected fields for a given order line
operationId: patchOrderLine
parameters:
- name: id
in: path
description: Id of the order line
required: true
schema:
type: string
format: string
requestBody:
$ref: "#/components/requestBodies/PatchRequest"
responses:
"204":
description: The order line was successfully updated.
"400":
description: Invalid input
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"404":
description: The order line was not found
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
delete:
operationId: deleteOrderLine
summary: Delete an order line
tags:
- order line
parameters:
- name: id
in: path
required: true
description: The id of the order line to delete.
schema:
type: string
responses:
"204":
description: The order line was successfully deleted.
"400":
description: The request could not be understood
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"403":
description: Order line is not in state suitable for deletion.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
/order-lines:
post:
operationId: createOrderLines
summary: Create new order lines
tags:
- order line
requestBody:
$ref: "#/components/requestBodies/OrderLineArray"
responses:
"201":
description: The order lines were successfully created.
headers:
Location:
description: The location of the newly created order lines.
schema:
type: array
items:
type: string
format: uri
"400":
description: The request could not be understood.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
put:
operationId: updateOrderLines
summary: Update existing order lines
tags:
- order line
requestBody:
$ref: "#/components/requestBodies/OrderLineArray"
responses:
"204":
description: Order lines were successfully updated.
"400":
description: The request could not be understood.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"403":
description: Illegal state changes are attempted.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request.
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
get:
operationId: getOrderLines
summary: Search order lines by parameters
tags:
- order line
parameters:
- name: order
in: query
description: Multiple references to Order can be provided.
explode: true
schema:
type: array
items:
type: string
responses:
"200":
description: Order lines were successfully retrieved.
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/OrderLine"
"400":
description: The request could not be understood
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
# TODO: 2022-01-24 OLL This is not working
# "403":
# description: Forbidden
# content:
# "*/*":
# schema:
# $ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/system/findOrCreateParty:
post:
tags:
- Party
summary: Find or create Party for given organizationReference
description: >-
This is a infrastructure-only operation that will search for a Party
having the given organizationReference.
If no Party is found a Party will be created referencing the given organizationReference and an empty list of allowedRoles.
operationId: systemFindOrCreatePartyMethod
requestBody:
$ref: "#/components/requestBodies/OrganizationReference"
responses:
"201":
description: The Party was successfully found or created
headers:
location:
description: The location of the found or created Party.
schema:
type: string
format: uri
"400":
description: Invalid input
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
/system/hasOpenOrder:
get:
tags:
- Order
summary: Check if an open order exists for the careplan
description: Check if an open order exists for the careplan
operationId: hasOpenOrder
parameters:
- name: careplan
description: Single careplan reference can be provided
in: query
required: true
schema:
type: string
responses:
"200":
description: Boolean {body} = true if an open order exists for the careplan
exists, and body = {false} if no order or status is not open
content:
application/json:
schema:
type: boolean
"400":
description: Invalid input
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/custom/hasValidContract:
get:
tags:
- Contract
summary: Check if a valid contract exists between the two parties
description: Check if a valid contract exists between the two parties
operationId: hasValidContract
parameters:
- name: seller
description: Single seller reference can be provided, e.g.
"http://ssl-order.ehealth.sundhed.dk/v1/party/b83e7b2e-779f-44fc-9c4d-b1f564303a31"
in: query
required: true
schema:
type: string
- name: buyer
description: Single buyer reference can be provided, e.g.
"https://ssl-order.ehealth.sundhed.dk/v1/party/d36202ed-4751-449b-a371-53a94b6b3ca4"
in: query
required: true
schema:
type: string
responses:
"200":
description: Boolean {body} = true if valid contract between seller and buyer
exists, and body = {false} if no contract
content:
application/json:
schema:
type: boolean
"400":
description: Invalid input
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
# TODO: 2022-01-24 OLL This is not working
# "403":
# description: Forbidden
# content:
# "*/*":
# schema:
# $ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/custom/findOrCreateParty:
post:
tags:
- Party
summary: Find or create Party for given organizationReference
description: >-
This operation will search for a Party having the given
organizationReference.
If no Party is found a Party will be created referencing the given organizationReference and a list of allowedRoles depending on the user type supplied in the authentication token:
- UserType PRACITIONER, allowedRoles: BUYER, ACCOUNTING
- UserType SSL, allowedRoles: SELLER
The given organizationReference must match the organization context supplied in the authentication token.
operationId: findOrCreatePartyMethod
requestBody:
$ref: "#/components/requestBodies/OrganizationReference"
responses:
"201":
description: The Party was successfully found or created
headers:
location:
description: The location of the found or created Party.
schema:
type: string
format: uri
"400":
description: Invalid input
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
"500":
description: The server encountered an unexpected condition which prevented it
from fulfilling the request
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
"*/*":
schema:
$ref: "#/components/schemas/Error"
servers:
- url: https://ssl-order.{environment}.ehealth.sundhed.dk/v1
variables:
environment:
default: unknown
components:
requestBodies:
PatchRequest:
content:
application/json-patch+json:
schema:
$ref: "#/components/schemas/PatchRequest"
description: The JSON patch object
required: true
Order:
content:
application/json:
schema:
$ref: "#/components/schemas/Order"
required: true
OrderLineArray:
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/OrderLine"
required: true
OrderLine:
content:
application/json:
schema:
$ref: "#/components/schemas/OrderLine"
required: true
OrganizationReference:
content:
application/json:
schema:
$ref: "#/components/schemas/OrganizationReference"
description: OrganizationReference of the Party
required: true
securitySchemes:
bearerAuth:
description: Bearer authorization (JWT) token, e.g. `Bearer <token>`
type: http
scheme: bearer
bearerFormat: JWT # optional, for documentation purposes only
schemas:
Party:
type: object
required:
- allowedRoles
- name
properties:
id:
type: string
description: Unique ID of this Party. Assigned by server
example: 1
allowedRoles:
type: array
items:
type: string
enum:
- ACCOUNTING
- BUYER
- SELLER
description: Allowed roles for this party
example:
- BUYER
- ACCOUNTING
name:
type: string
pattern: ^(?!\s*$).+
description: Party name
example: Aarhus University Hospital
email:
type: string
format: email
description: Party contact person email
example: auh@rm.dk
organization:
type: string
description: Reference to the corresponding ehealth-organisation in the clinical
domain. Pattern should be used
^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+\/Organization/\d+$
example: https://ehealth.sundhed.dk/organization/fhir/Organization/1566241
Contract:
type: object
required:
- validityPeriod
- seller
- account
properties:
id:
type: string
description: Unique ID of this contract. Assigned by server
example: 2
name:
type: string
# Længden er 50 på DB tabellen, men den kan se således ud
# catalogue-item/68c5d987-b530-48bd-9869-e2f2f0ee5387 altså length på 51
# maxLength: 51
pattern: ^(?!\s*$).+
description: A human readable short headline describing this contract.
example: XYZ Supplier 2019-21 for Mainland area
validityPeriod:
type: object
required:
- start
properties:
start:
type: string
format: date
description: Start Date for this time period
example: 2019-01-01
end:
type: string
format: date
description: Last day of contract validity period
example: 2020-01-01
description: Period where this contract is valid
seller:
type: string
example: http://ehealth.sundhed.dk/ssl-governance/v1/party/456
description: Reference (by rest url) to the SSL service provider
account:
type: string
example: http://ehealth.sundhed.dk/ssl-governance/v1/party/457
description: Reference (by rest url) to the healthcare organisation responsible
for paying for services. Typically this will be a high level
organisation like a region or municipality
buyer:
type: array
items:
type: string
example:
- http://ehealth.sundhed.dk/ssl-governance/v1/party/458
- http://ehealth.sundhed.dk/ssl-governance/v1/party/459
description: References (by rest url) to the healthcare organisations ordering
services. A contract can support multiple buyers (e.g. different
hospitals or departments)
reminderDays:
type: integer
format: int32
description: Default number of days before an appointment with a patient where a
reminder should be sent
example: 30
Order:
type: object
description: An order represents a request for items and services to be delivered to
a recipient. The order is placed by a practioner and executed by a
provider.
allOf:
- required:
- status
- buyer
- receiver
- $ref: "#/components/schemas/OrderBase"
OrderBase:
properties:
id:
type: string
description: Globally unique ID of this order. Assigned by server.
threadId:
type: string
description: Thread id for ehealth-messages for this order.
identifiers:
type: array
description: Identifiers to connect Order to external content available in other
frameworks or protocols.
items:
$ref: "#/components/schemas/Identifier"
status:
$ref: "#/components/schemas/OrderStatus"
priority:
type: boolean
description: Shows if this order has high priority.
notes:
type: array
description: Notes attached to the order by buyer or seller. These are intended
to contain remarks or details about the fulfilment of the order
example:
- timestamp: 2020-01-01T00:00:00Z
authorName: John Doe
authorOrganization: Some organization
text: Some note
items:
$ref: "#/components/schemas/OrderNotes"
buyer:
type: string
description: Reference to BuyerCustomerParty on behalf of which this order is
placed.
example: https://ehealth.sundhed.dk/ssl-governance/v1/party/313
seller:
type: string
description: Reference to SellerSupplierParty which is responsible for supplying
the items required to fulfil this order.
example: https://ehealth.sundhed.dk/ssl-governance/v1/party/312
sellerDeliveryContactEmail:
type: string
description: Email or a label
example: viggo@somemail.com
maxLength: 256
carePlanRef:
type: string
maxLength: 100
description: Reference to careplan.
example: https://ehealth.sundhed.dk/careplan/fhir/CarePlan/15241
carePlanTitle:
type: string
description: The title of the careplan. Automatically filled by the system based
on carePlanRef.
example: KOL
earliestDeliveryDate:
type: string
format: date
description: Earliest delivery date of order. Automatically filled by the system
based on the agreed time of unfulfilled order lines.
example: 2020-01-01
latestDeliveryDate:
type: string
format: date
description: Latest delivery date of order. Automatically filled by the system
based on the agreed time of unfulfilled order lines.
example: 2020-02-02
receiver:
$ref: "#/components/schemas/OrderReceiver"
OrderReceiver:
type: object
description: Contact information of the recipient to whom the items and services in
this order are to be delivered or picked-up.
properties:
name:
type: string
maxLength: 100
addressLine1:
type: string
maxLength: 100
addressLine2:
type: string
maxLength: 100
postalCode:
type: string
maxLength: 100
postalDistrict:
type: string
maxLength: 100
email:
type: string
maxLength: 100
phone:
type: string
maxLength: 100
patient:
type: string
maxLength: 100
description: Reference to the corresponding ehealth-patient in the clinical
domain. Pattern should be used -
^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+\/Patient/\d+$
example: https://ehealth.sundhed.dk/patient/fhir/Patient/1566241
OrderDetails:
type: object
description: An order details represent all information about order, order lines and
trace lines related to this order.
required:
- order
properties:
order:
$ref: "#/components/schemas/Order"
orderLines:
type: array
description: Order lines information related to this order.
items:
$ref: "#/components/schemas/OrderLine"
traceLines:
type: array
description: Trace lines information related to this order.
items:
$ref: "#/components/schemas/TraceLine"
OrderLine:
type: object
description: An order represents a request for items and services to be delivered to
a recipient. The order is placed by a practioner and executed by a
provider.
required:
- order
- status
- agreedFrom
- agreedTo
properties:
id:
type: string
description: Globally unique ID of this order item. Assigned by server
order:
type: string
description: Reference to order to which this order line belongs
example: https://ssl-order.ehealth.sundhed.dk/v1/order/21
status:
$ref: "#/components/schemas/OrderLineStatus"
item:
type: string
description: Reference to ordered catalog item
example: https://ssl-catalogue.ehealth.sundhed.dk/v1/catalogue-item/14
agreedFrom:
type: string
format: date-time
description: The agreed from is a time agreed between the seller and the receiver
as the earliest date for next delivery or pickup attempt or shipment
to be made.
example: 2020-01-01T00:00:00Z
agreedTo:
type: string
format: date-time
description: The agreed to is a time agreedbetween the seller and the receiver as
the latest date for the next delivery or pickup attempt or shipment
to be made.
example: 2020-01-01T00:00:00Z
device:
type: object
description: The actual device to be delivered or picked up. Only relevant when
the fulfilment involves an actual device (opposed to delivery of a
service).
properties:
externalId:
type: string
description: External id of the device
identifiers:
type: array
description: Identifiers to connect Device instance to external content
available in other frameworks or protocols.
items:
$ref: "#/components/schemas/Identifier"
clinicalRef:
type: string
description: A reference to the corresponding Device resource in the
FHIR-based clinical backend.
example: https://ehealth.sundhed.dk/device/fhir/Device/1566241
TraceLine:
type: object
description: A trace line documents a single atomic business event related to an
order and optionally a number of order lines.
required:
- createdByOrganization
- text
- order
properties:
id:
type: string
description: Globally unique ID of this order item. Assigned by server
timestamp:
type: string
format: date-time
description: Date and time at which this trace line was created.
example: 2020-01-01T00:00:00Z
createdByOrganization:
type: string
description: The name of the organization which created or directly caused this
trace line.
createdByUser:
type: string
description: The name of the user which created or directly caused this trace
line.
text:
type: string
description: A Danish-language human-readable text lines carrying the a
description of what triggered this trace line.
supplementaryText:
type: string
description: A supplementary Danish-language human-readable text lines carrying
the a description of what triggered this trace line.
order:
type: string
description: Reference to Order to which this trace line is related.
example: https://ssl-order.ehealth.sundhed.dk/v1/order/21
orderLine:
type: string
description: Reference to order line to which this trace line is related.
example: https://ssl-order.ehealth.sundhed.dk/v1/order-line/21
statusChange:
$ref: "#/components/schemas/StatusChange"
StatusChange:
type: object
description: StatusChange represents changes of status for order or order line.
required:
- oldStatus
- newStatus
properties:
oldStatus:
type: string
maxLength: 32
description: Status of the resource immediately prior to the event which
triggered this TraceLine.
newStatus:
type: string
maxLength: 32
description: Status of the resource immediately after to the event which
triggered this TraceLine.
OrganizationReference:
type: object
description: OrganizationReference contains a reference to an organization.
required:
- organizationReference
properties:
organizationReference:
type: string
description: Reference to Organization.
example: https://ehealth.sundhed.dk/organization/fhir/Organization/123
Coding:
type: object
description: Coding system from clinical domain.
required:
- system
- code
properties:
system:
type: string
maxLength: 100
format: uri
description: A URI string referring the Identity of the terminology system
example: http://ehealth.sundhed.dk/vs/device-measuring-quality
code:
type: string
maxLength: 100
pattern: "[^\\s]+([\\s]?[^\\s]+)*"
description: Code value taken from a set of controlled strings defined in the
system
example: MEDIUM
display:
type: string
maxLength: 100
readOnly: true
description: Human-readable value taken from a set of controlled strings defined
in the system
example: Precision < 0.5kg
Identifier:
type: object
description: A numeric or alphanumeric string that is associated with a single object
or entity within a given system. Typically, identifiers are used to
connect content in resources to external content available in other
frameworks or protocols. Identifiers are associated with objects and may
be changed or retired due to human or system process and errors.
properties:
system:
type: string
maxLength: 100
description: The namespace for the identifier value
example: urn:ietf:rfc:3986
value:
type: string
maxLength: 100
description: The value that is unique
pattern: ^(?!\s*$).+
example: NUC8766
assigner:
type: string
maxLength: 100
description: Organization that issued id (may be just text)
example: Danish Health Authorities
OrderNotes:
type: object
description: Notes attached to the order by buyer or seller. These are intended to
contain remarks or details about the fulfilment of the order
required:
- text
properties:
timestamp:
type: string
format: date-time
authorName:
type: string
maxLength: 100
authorOrganization:
type: string
maxLength: 100
text:
type: string
maxLength: 100
Error:
type: object
description: An business process error reported by the server.
required:
- id
- time
- message
properties:
id:
type: string
format: uuid
description: Unique ID of this error
example: e1f6678e-512c-11e9-8647-d663bd873d93
time:
type: string
format: date-time
description: Date and time this error occurred
example: 2020-01-01T01:00:00Z
code:
type: string
format: string
description: A protocol defined code allowing the client to understand the error
and act appropriately
example: ORD00125
message:
type: string
format: string
description: An English text describing the error in end-user terms
example: Some server or client error
technicalDetails:
type: string
format: string
description: An detailed technical description of an internal, non-business error
example:
OrderStatus:
type: string
description: Status of the order (DRAFT, SUBMITTED, ASSIGNED, VALIDATED, CONDITIONALLY_ACCEPTED, CONDITIONS_ACCEPTED, DECLINED, ACCEPTED, TIME_OF_FULFILLMENT_AGREED, FULFILLED, REVOKED)
enum:
- DRAFT
- SUBMITTED
- ASSIGNED
- VALIDATED
- CONDITIONALLY_ACCEPTED
- CONDITIONS_ACCEPTED
- DECLINED
- ACCEPTED
- TIME_OF_FULFILLMENT_AGREED
- FULFILLED
- REVOKED
OrderLineStatus:
type: string
description: Status of the orderline (UNFULFILLED, FULFILLED)
enum:
- UNFULFILLED
- FULFILLED
PatchRequest:
description: A JSONPatch request
type: array
items:
$ref: "#/components/schemas/PatchDocument"
PatchDocument:
description: A JSONPatch document as defined by RFC 6902
required:
- op
- path
properties:
op:
type: string
description: The operation to be performed
enum:
- add
- remove
- replace
- move
- copy
- test
path:
type: string
description: A JSON-Pointer
value:
type: object
description: The value to be used within the operations.
from:
type: string
description: A string containing a JSON Pointer value.
Child pages (Children Display) |
---|