Skip to content

Commit

Permalink
Logical model examples without resourceType or id (#86)
Browse files Browse the repository at this point in the history
* Logical model examples without resource type or id

* Use updated ig resource format extension url

* Use full canonical URL for resourceType. Add id element

* Use id data type for id element
  • Loading branch information
jafeltra authored Feb 7, 2024
1 parent a50ef1c commit 683a034
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions content/docs/SUSHI/tips/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,15 @@ Logical: MyLM
Id: MyLM
Title: "My LM"
Description: "This is mine"
* important 1..1 SU boolean "Is this resource important"
* id 1..1 SU id "Identifier for the logical model"
* important 1..1 SU boolean "Is this logical model important"
```

Create the file `input/examples/Binary-my-logical-example.json`:

```json
{
"resourceType": "MyLM",
"resourceType": "http://example.org/StructureDefinition/MyLM",
"id": "my-logical-example",
"important": true
}
Expand All @@ -139,14 +140,19 @@ And add the following in your `sushi-config.yaml`:
resources:
Binary/my-logical-example:
extension:
- url: http://hl7.org/fhir/StructureDefinition/implementationguide-resource-format
- url: http://hl7.org/fhir/tools/StructureDefinition/implementationguide-resource-format
valueCode: application/fhir+json
name: Example of LM
exampleCanonical: http://example.org/StructureDefinition/MyLM
```

Both approaches will result in your logical model example being listed and displayed as a proper example of the logical model.

If the logical model does not have `resourceType` or `id`, the same steps as above can be used with a few small adjustments:

- In step 1, the file name of the example can be any valid file name (e.g. `hook-example.json`)
- In step 2, the key in the resources list should be `Binary/{filename}`, where `{filename}` matches the the file name of the example without the file extension (e.g. `Binary/hook-example`)

## Manual Slice Ordering

{{% small-pageinfo color="primary" %}}
Expand Down

0 comments on commit 683a034

Please sign in to comment.