Skip to content

Fix support markdown extension#190

Open
patrick-werner wants to merge 5 commits into
LHNCBC:masterfrom
patrick-werner:fix-support-markdown-extension
Open

Fix support markdown extension#190
patrick-werner wants to merge 5 commits into
LHNCBC:masterfrom
patrick-werner:fix-support-markdown-extension

Conversation

@patrick-werner
Copy link
Copy Markdown
Contributor

This pull request improves the handling of FHIR rendering-markdown extensions by adding support for both the correct valueMarkdown and the legacy valueString keys during import and export. It ensures that the original format is preserved and round-tripped correctly, and adds tests for this behavior.

FHIR rendering-markdown support improvements:

  • Added a utility function getMarkdownExtensionValue in internal-utils.js to extract markdown text from either valueMarkdown or valueString, ensuring compatibility with both new and legacy FHIR data.
  • Updated SDC import logic in sdc-import-common.js to use the new utility, store the original markdown value and its type, and pass these through to the export logic. This preserves whether the source used valueMarkdown or valueString. [1] [2] [3]
  • Updated SDC export logic in sdc-export-common.js to use the correct key (valueMarkdown or valueString) based on the original import, ensuring round-trip fidelity. [1] [2]

Testing:

  • Added a new test questionnaire JSON file using valueMarkdown for rendering-markdown, and a corresponding Karma test to verify correct import and export handling. [1] [2]

@patrick-werner
Copy link
Copy Markdown
Contributor Author

fixes #191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants