feat: add ClinicalImpression helper and enhance Observation categorization#194
Open
DinhLucent wants to merge 2 commits intodotimplement:mainfrom
Open
feat: add ClinicalImpression helper and enhance Observation categorization#194DinhLucent wants to merge 2 commits intodotimplement:mainfrom
DinhLucent wants to merge 2 commits intodotimplement:mainfrom
Conversation
adamkells
requested changes
Apr 15, 2026
Contributor
adamkells
left a comment
There was a problem hiding this comment.
Hey @DinhLucent , great work on this. Apologies for the delay in reviewing. I've added a few minor comments.
Additionally, it would be great to add some tests for this and also add these methods to healthchain/fhir/init.py.
Also, I'd be really interested to learn more about the use case that motivates these additions.
| status: str = "completed", | ||
| description: Optional[str] = None, | ||
| date: Optional[str] = None, | ||
| version: Optional[Union["FHIRVersion", str]] = None, |
Contributor
There was a problem hiding this comment.
Union isn't imported earlier in the file.
| if not impression.finding: | ||
| impression.finding = [] | ||
|
|
||
| impression.finding.append(finding) |
Contributor
There was a problem hiding this comment.
Here we are appending a raw dict, it would be better to import from Fhir.resources and use ClinicalImpressionFinding(**finding).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces support for Clinical Reasoning outputs in the FHIR resource helpers:
create_clinical_impressionandadd_finding_to_clinical_impressionto support AI agents recording diagnostic assessments.create_value_quantity_observationto support thecategoryelement, enabling better filtering (e.g.vital-signs,laboratory) and FHIR profile compliance.These additions are crucial for building autonomous clinical agents that need to output structured evidence-based findings.