Skip to content

fhir: map reference in extension#1590

Merged
josephjclark merged 9 commits intomainfrom
feat/1583-fhir-extensions
Mar 13, 2026
Merged

fhir: map reference in extension#1590
josephjclark merged 9 commits intomainfrom
feat/1583-fhir-extensions

Conversation

@hunterachieng
Copy link
Contributor

Summary

  • Added a reference mapper in mapExtension in generate-code.
  • Added a failing test for a created extension with correctly mapped reference. (This should fail and pass after fhir-eswatini is regenerated)

Fixes #1583

Details

Add technical details of what you've changed (and why).

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to
know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

Review Checklist

Before merging, the reviewer should check the following items:

  • Does the PR do what it claims to do?
  • If this is a new adaptor, added the adaptor on marketing website ?
  • If this PR includes breaking changes, do we need to update any jobs in
    production? Is it safe to release?
  • Are there any unit tests?
  • Is there a changeset associated with this PR? Should there be? Note that
    dev only changes don't need a changeset.
  • Have you ticked a box under AI Usage?

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
@hunterachieng
Copy link
Contributor Author

@josephjclark I had branched off of the previous branch, hence the many commit messages

Copy link
Collaborator

@josephjclark josephjclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastico!

@josephjclark
Copy link
Collaborator

@hunterachieng couple of notes for future reference

  1. When we make a change to the generator, we need to a) bump the version (either with changeset or by manually bumping the package.json and changset), and b) when the generator version changes, re-run the builder so that the package.json metadata is correct (check the package.json for fhir-eswatini on this branch now that I've versioned it)
  2. Just in case it's useful later, in the build/mappings.js file in the IG folder, you can specifiy includes with a resource type (like Patient) to ONLY re-generate that resource. I do this in dev all the time - super helpful

@josephjclark josephjclark merged commit a9018d2 into main Mar 13, 2026
2 checks passed
@josephjclark josephjclark deleted the feat/1583-fhir-extensions branch March 13, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

fhir-gen: extensions with a Reference type do not map

2 participants