Migrate to fhir format#141
Merged
Merged
Conversation
ruscoder
reviewed
May 17, 2026
| env_questionnaire_response = extract_client.resource("QuestionnaireResponse", **resource) | ||
| elif resource["resourceType"] == "Parameters": | ||
| env = await parameter_to_env(extract_client, resource, is_fhir) | ||
| env = await parameter_to_env(extract_client, resource, True) |
Member
There was a problem hiding this comment.
since we drop support for aidbox format, we can get rid of is_fhir flag it as well
ruscoder
reviewed
May 17, 2026
| constraint_legacy_behavior = ( | ||
| os.getenv("CONSTRAINT_LEGACY_BEHAVIOR", "True").lower() == "true" | ||
| ) | ||
| constraint_legacy_behavior = os.getenv("CONSTRAINT_LEGACY_BEHAVIOR", "True").lower() == "true" |
Member
There was a problem hiding this comment.
what's wrong with formatting? there should be ruff/black formatter that unopinatedly formats the code
Contributor
Author
There was a problem hiding this comment.
that's black and isort. Moved to autoformatting to separate blame-ignored commits
ruscoder
reviewed
May 17, 2026
ruscoder
reviewed
May 18, 2026
| return [ext["valueCanonical"] for ext in exts if ext.get("valueCanonical")] | ||
|
|
||
|
|
||
| def get_item_constraints(extensions: list) -> list[dict]: |
Member
There was a problem hiding this comment.
@alexlipovka better to avoid using dicts, create typed dict like LaunchContext (see example above)
ruscoder
reviewed
May 18, 2026
|
|
||
| async def parameter_to_env( | ||
| client: AsyncFHIRClient, resource, is_fhir: bool = True | ||
| client: AsyncFHIRClient, resource: Parameters, is_fhir: bool = True |
Member
There was a problem hiding this comment.
let's remove is_fhir - it's default behaviour now
ruscoder
reviewed
May 18, 2026
| result = fhirpath({}, expression, env) | ||
|
|
||
| if result == [True if legacy_behavior else False]: | ||
| # TODO: calculate error location path |
ruscoder
reviewed
May 22, 2026
|
|
||
|
|
||
| @pytest.mark.asyncio | ||
| async def test_assemble_propagates_cqf_library(): |
Member
There was a problem hiding this comment.
re-write using safedb similar to others
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.
No description provided.