microsoft / microsoft/fhir-server

instantiatesCanonical URIs during transaction

Open
#1,030 6 comments 0 reactions 1 assignee Claimed by @brendankowitz View on GitHub
Bug VSTS-Backlog
Dominant language
TSQL
Stars
1.4k
Forks
592
Avg merge
2d 7h
Merged PRs (30d)
41

Description

(TL;DR - how should canonical IDs be handled during a bundle import? I have a feeling from my reading I'm missing what the intended behavior should be)

As a user of the open source version of the FHIR Server, I am able to import a bundle as a transaction. This includes a ServiceRequest resource, which includes an `instantiatesCanonical` attribute, e.g.:

```
"instantiatesCanonical": [
"urn:uuid:abcdefe6-f6ac-412d-8ce1-abcdef26b896"
],
```

The referenced URI is mapped to a PlanDefinition resource further down in the bundle, e.g.,

```
{
"fullUrl": "urn:uuid:abcdefe6-f6ac-412d-8ce1-abcdef26b896",
"resource": {
"resourceType": "PlanDefinition",
"language": "en-US",
```

The bundle imports correctly, and when retrieving the ServiceRequest, it has preserved the original `instantiatesCanonical` URI for the PlanDefinition. However, the FHIR server has (correctly) assigned a new ID to the PlanDefinition resource, which means my link to the PlanDefinition is lost.

In the HAPI FHIR implementation, it appears that the ServiceRequest `instantiatesCanonical` URI is updated with the PlanDefinition ID assigned by the FHIR server. I'm not sure if that is the expected behavior here, or if our PlanDefinition should include a `url` attribute to act as the canonical identifier (https://www.hl7.org/fhir/plandefinition-definitions.html#PlanDefinition.url)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.