Skip to content

Commit 464aaad

Browse files
committed
Update reference.md
1 parent 0010ed8 commit 464aaad

File tree

1 file changed

+58
-1
lines changed

1 file changed

+58
-1
lines changed

input/pagecontent/reference.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1508,7 +1508,7 @@ The `Usage` keyword specifies how the instance should be presented in the IG:
15081508

15091509
* `Usage: #example` means the instance is intended as an illustration of a profile, and will be presented on the Examples tab for the corresponding profile.
15101510
* `Usage: #definition` means the instance is a conformance item that is an instance of a resource such as a search parameter, operation definition, or questionnaire. These items will be presented on their own IG page.
1511-
* `Usage: #inline` means the instance should not be instantiated as an independent resource, but appears as part of another instance (for example, in a composition or bundle).
1511+
* `Usage: #inline` means the instance should not be instantiated as an independent resource, but will appear as part of another instance (for example, as a [contained resource](https://www.hl7.org/fhir/references.html#contained) or in a [Composition](https://www.hl7.org/fhir/composition.html) or [Bundle](https://www.hl7.org/fhir/bundle.html)).
15121512

15131513
If `Usage` is unspecified, the default is `#example`.
15141514

@@ -1541,6 +1541,63 @@ If `Usage` is unspecified, the default is `#example`.
15411541
* identifier[NPI].value = "8274017284"
15421542
```
15431543

1544+
This instance would be incorporated into a Composition with a statement such as:
1545+
1546+
```
1547+
* section[0].entry[1] = Reference(DrDavidAnydoc)
1548+
```
1549+
1550+
* Define a Patient instance, and then inline that instance into a Condition as a contained resource:
1551+
1552+
```
1553+
Instance: EveAnyperson
1554+
InstanceOf: Patient
1555+
Usage: #inline // #inline means this instance should not be exported as a separate example
1556+
* name.given[0] = "Eve"
1557+
* name.family = "Anyperson"
1558+
1559+
Instance: EvesCondition
1560+
InstanceOf: Condition
1561+
Usage: #example
1562+
Description: "An example that uses contained"
1563+
* contained[0] = EveAnyperson // this inlines EveAnyperson definition here
1564+
* code = http://foo.org#bar
1565+
* subject = Reference(EveAnyperson) // this automatically creates the relative reference correctly
1566+
```
1567+
This results in:
1568+
1569+
```json
1570+
{
1571+
"resourceType": "Condition",
1572+
"id": "EvesCondition",
1573+
"contained": [
1574+
{
1575+
"resourceType": "Patient",
1576+
"id": "EveAnyperson",
1577+
"name": [
1578+
{
1579+
"given": [
1580+
"Eve"
1581+
],
1582+
"family": "Anyperson"
1583+
}
1584+
]
1585+
}
1586+
],
1587+
"code": {
1588+
"coding": [
1589+
{
1590+
"code": "bar",
1591+
"system": "http://foo.org"
1592+
}
1593+
]
1594+
},
1595+
"subject": {
1596+
"reference": "#EveAnyperson"
1597+
}
1598+
}
1599+
```
1600+
15441601
* Define an instance of PrimaryCancerCondition, using many available features:
15451602

15461603
```

0 commit comments

Comments
 (0)