Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MethodURLParametersDescriptionNotes
POST/ehrehrs
  • subjectId (optional): id of the subject in the external system
  • subjectNamespace (optional): namespace of the subject id in the external system
  • committer
  • audit change type
  • commit audit description

Create a new EHR

HF: How do subjectId and subjectNamespace manifest themselves in the EHR model/resource?

HF: We should allow EHR_STATUS and EHR_ACCESS objects so it is not necessary to make additional requests resulting in multiple contributions

BL: Good idea.

HF: We need audit details for the contribution

HF: What is returned in the response?

BL: I suggest we

PUT/ehr/{ehrId}As aboveCreate a new EHR with specified ehr_idHF: Required when creating an EHR with same ehr_id as in another system
GET/ehr/{ehrId} Get EHRHF: Useful to get profile of an EHR

: At the moment only:

Code Block
{
  "meta": {
    "href": "http://localhost:8082/rest/v1/ehr/f77f9b4a-cfda-414d-aa6c-4f78bcac7601"
  },
  "action": "CREATE",
  "ehrId": "f77f9b4a-cfda-414d-aa6c-4f78bcac7601"
}
PUT/ehrs/{ehrId}As aboveCreate a new EHR with specified ehr_idHF: Required when creating an EHR with same ehr_id as in another system
GET/ehrs/{ehrId} Get EHRHF: Useful to get profile of an EHR. E.g. time created, how many compositions, is there a directory, what was the last contribution etc.
DELETE/ehrehrs/{ehrId} Delete an EHR

TB: this isn't possible (well not by an external REST access - it would be an internal admin operation); all you can do is mark an EHR as inactive, which would be a POST (I think) to /ehr/{ehr_id}/ehr_status/other_details/is_active or similar. But even this operation, if it succeeds, is serious - it makes it look like an EHR is deleted, so it's probably not appropriate via any externally visible REST interface.

SI: In some countries the patient/client is owner of the data and it has the right (by the law) to ask for a complete (total) removal of all his data, which is more than just an inactive flag.

TB: that's true, but doing the delete would require some documentation and/or special permission. I still doubt very much that this could ever be done through a visible REST interface, unless all the proof parameters were provided, and I think these would be too variable to standardise.

DB: I agree with SI, this can be a requirement. The authentication/permission is a completely different issue. You could argue that the same kind documentation or special permission would be needed for creating a new composition.

BL: I would leave this out of the REST API for the moment. If this is a requirement somewhere it can be performed by other means (special admin interface to the system or similar).

DB: I won't leave this out, delete has a clear use case (i.e. opt-out from clinical research)

ES: Seems like delete EHR is needed in some cases, so it should be system configurable, we just need to agree on what HTTP status codes/messages to return for different cases.

GET/ehrehrs/{ehrId}/ehr_status Retrieve EHR_STATUS 
POST/ehrehrs/{ehrId}/ehr_status /{versionUid}
  • committer
  • audit change type
  • commit audit description
Update EHR_STATUS

HF: Can we create using this also?HF

BL: We need Do we need to - would it not be better to create a default status and access when creating EHR (or use the provided ones in the EHR create call body).

HF: We need audit details for the contribution

HF: We should provide precedingVersionUid or something to support optimistic locking

BL: Added versionUid.

HF: What is returned in the response?

BL: What would you have in response?

PUT/ehrehrs/{ehrId}/ehr_status/... Update an attribute in ehr_status

TB

HF: Do we really want to provide this level of updates, it may result in many contributions when multiple attributes need to be updated

GET/ehrehrs/{ehrId}/ehr_access Retrieve EHR_ACCESS 
POST/ehrehrs/{ehrId}/ehr_access /{versionUid}
  • committer
  • audit change type
  • commit audit description
Update EHR_ACCESS

HF: Can we create using this also?

HF: We need audit details for the contribution

HF: We should provide precedingVersionUid or something to support optimistic locking

HF: What is returned in the response?

PUT/ehrehrs/{ehrId}/ehr_acess/... Update an attribute in ehr_access

TB

HF: Do we really want to provide this level of updates, it may result in many contributions when multiple attributes need to be updated

...

MethodURLParametersDescriptionAPI levelNotes
GET/ehrehrs/{ehrId}/directory Get folder objectR1HF: Not really a list of folders, it is the folder object
GET/ehrehrs/{ehrId}/directory/{folderId}/... Get folder objectR1HF: this shouldn't be limited to single level of folders
POST/ehrehrs/{ehrId}/directory/{versionUid} Create or update a folder 

HF: We need audit details for contribution

HF: We should provide precedingVersionUid or something to support optimistic locking

HF: What is returned in the response?

DELETE/ehrehrs/{ehrId}/directory/{versionUid} Deletes a folder 

SI

Resource COMPOSITION

MethodURLParametersDescriptionAPI levelNotes
POST

/compositions

/ehrehrs/{ehrId}/compositions

  • ehrId
  • committer
  • audit change type
  • version lifecycle state
  • commit commentaudit description

Create a new composition

 

HF: If we use the second URL we don't need to specify ehrId as parameter

HF: should use the RM term of commit audit description rather than commit comment

HF: audit parameters should be group under commit audit parameter

HF: What is returned in the response?

PUT/ehr

HF: audit parameters should be group under commit audit parameter

HF: What is returned in the response?

BL: response is very simple:

Code Block
{
  "meta": {
    "href": "http://example.domain.com:8082/rest/v1/composition/bddcedc8-46cc-4df6-8b1a-b05534235f17::example.domain.com::1"
  },
  "action": "CREATE",
  "compositionUid": "bddcedc8-46cc-4df6-8b1a-b05534235f17::example.domain.com::1"
}
PUT/ehrs/{ehrId}/compositions/{objectId} Create a new composition with specified objectId HF: Useful when you want to control the object ID
GET

/compositions/{compositionId}
/ehrehrs/{ehrId}/compositions/{compositionId}

 Retrieve a compositionR1

Do we return a VERSION or a COMPOSITION here?

HF: I would prefer VERSION

BL: I would prefer a different resource returning versions

HF: is compositionId the version UID or object IDcompositionId the version UID or object ID?

BL: we could have both - one returns exact version specified, the other latest one?

HF: Should be able to request version by uid, point in time or at specified contribution?

BL: Good idea - can you suggest parameters?

GET

/compositions/{compositionId}/version
/ehrehrs/{ehrId}/compositions/{compositionId}/version 

 

 Retrieve a VERSION 

BL

HF: I would prefer the reverse approach to align with RM
E.g. /compositions/{compositionId}/data

HF: is compositionId the version UID or object ID?

POST

/compositions/{compositionId}

/ehr/{ehrId}/compositions/{compositionId}

  • committer
  • audit change type
  • version lifecycle state
  • commit comment
Update a composition 

HF: is compositionId the version UID or object ID? If version UID then it should be PUT. Having said that, FHIR uses PUT for update using an object ID.

BL: I think it should be version uid as it then also gives us optimistic locking

HF: We should provide precedingVersionUid or something to support optimistic locking, this could be done using the HTTP If-Match header

HF: What is returned in the response?

DELETE

/compositions/{compositionId}

/ehr/{ehrId}/compositions/{compositionId}

  • committer
  • audit change type
  • commit comment
Delete a composition 

HF: is compositionId the version UID or object ID?

BL: I think it should be version uid as it then also gives us optimistic locking


HF: We should provide precedingVersionUid or something to support optimistic locking

...