FHIR / FHIR/sushi

Sushi examples should preserve the order of fields in the output

Open
#1,340 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
188
Forks
65
Avg merge
8d 11h
Merged PRs (30d)
3

Description

Example resources can be difficult for users to inspect and understand since the fields are produced in a surprising order. Here's a minimal example of a simple patient -- notice the `active` and `gender` fields are moved to the bottom of the generated resource:

```
Instance: SimplePatient
InstanceOf: Patient
* active = true
* gender = #female
* address[+]
* use = #work
* address[+]
* use = #home
```

And the example output:

```
{
"resourceType": "Patient",
"id": "SimplePatient",
"address": [
{
"use": "work"
},
{
"use": "home"
}
],
"active": true,
"gender": "female"
}
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the compiler turns the shown FSH patient example into a JSON resource, then locate the serialization or resource-generation tests. Preserve the input field order in the generated output and add a regression case based on this example that verifies active and gender remain before the address fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.