Skip to content

fhir: map primitive elements#1678

Merged
josephjclark merged 19 commits into
release/nextfrom
feature/1557-fhir-underscores
Jun 30, 2026
Merged

fhir: map primitive elements#1678
josephjclark merged 19 commits into
release/nextfrom
feature/1557-fhir-underscores

Conversation

@hunterachieng

@hunterachieng hunterachieng commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Add ability to map primitive elements in fhir by focusing on elements starting with an _.
Regenerated fhir-eswatini with tests to check behavior

  • Ensured we do not throw away primitive elements in generate-schema then mapped by checking if the parent has an extension.

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>

@josephjclark josephjclark left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe a bit of confusion over whether we're handling primitve types or primitive extensions? I'm expecting that primitive types work already, and we're just adding support for extensions here

Comment thread packages/fhir-eswatini/test/resources/Patient.test.ts Outdated
Comment thread packages/fhir-eswatini/test/resources/Patient.test.ts Outdated
Comment thread packages/fhir-eswatini/src/profiles/SzVitalSigns.ts
Comment thread packages/fhir-eswatini/types/builders.d.ts Outdated
Comment thread tools/generate-fhir/src/generate-schema.ts Outdated
Comment thread tools/generate-fhir/test/generate-code.test.ts Outdated
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>
…hir-underscores

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
Comment thread tools/generate-fhir/test/generate-code.test.ts Outdated
Comment thread packages/fhir-eswatini/test/resources/Patient.test.ts Outdated
Comment thread tools/generate-fhir/test/generate-code.test.ts
Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
Comment thread packages/fhir-eswatini/src/builders.ts
Comment thread packages/fhir-eswatini/test/resources/Patient.test.ts
Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
@josephjclark josephjclark changed the base branch from main to release/next June 30, 2026 11:26
@josephjclark josephjclark merged commit 605a816 into release/next Jun 30, 2026
3 checks passed
@josephjclark josephjclark deleted the feature/1557-fhir-underscores branch June 30, 2026 11:33
josephjclark added a commit that referenced this pull request Jun 30, 2026
* bump sdk (#1708)

* DHIS2: Schema should not require username/password when using a PAT (#1689)

* fix(auth): check credential values not just key presence, make username/password optional in schema

* changeset file

* Revised the auth tests to be more descriptive

* build(deps): bump undici from 7.24.7 to 7.28.0 (#1694)

* build(deps): bump undici from 7.24.7 to 7.28.0

Bumps [undici](https://github.com/nodejs/undici) from 7.24.7 to 7.28.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](nodejs/undici@v7.24.7...v7.28.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 7.28.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* changeset

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joe Clark <joe@openfn.org>

* build(deps): bump esbuild from 0.27.4 to 0.28.1 (#1693)

Bumps [esbuild](https://github.com/evanw/esbuild) from 0.27.4 to 0.28.1.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](evanw/esbuild@v0.27.4...v0.28.1)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.28.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* dhis2: Add paging examples and default `async:false` in `tracker.import` (#1681)

* feat: allow async value change

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>

* feat: update tests

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>

* feat: add changeset

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>

* add integration tests for tracker.export

* add pagination example

* update example

* update integration test

* improve format

* remove async and add pagination docs

* update tracker unit tests

* update changeset

* fix typo

* fix: update chngeset and tracker pagination examples

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>

* fix: update docs

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>

---------

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
Co-authored-by: Emmanuel Evance <mtuchidev@gmail.com>

* fhir: map primitive elements (#1678)

* feat: implement primitive mappings

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>

* feat: update comments

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>

* fix tests

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>

* feat: update fhir-eswatini

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>

* fix: remove skipped tests

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>

* feat: fix primp value renaming

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>

* fix: package.json

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>

* feat: rebuild fhir-eswatini

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>

* fix: remove nested `_birthTime`

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>

* fix: add tests

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>

* clean up tests

* remove comment

* fix: add tests and update docs

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>

* bump fhir-gen tool

* fhir-eswatini: update build meta

* changeset

---------

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
Co-authored-by: Joe Clark <joe@openfn.org>

* versions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
Co-authored-by: Pius Kariuki <39379012+PiusKariuki@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: hunterachieng <79210550+hunterachieng@users.noreply.github.com>
Co-authored-by: Emmanuel Evance <mtuchidev@gmail.com>
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.

3 participants