Skip to content

Bulk FHIR Gen 3 Authorization Tagging - #313

Open
dsafarian wants to merge 11 commits into
uc-cdis:masterfrom
dsafarian:fhir_transform
Open

Bulk FHIR Gen 3 Authorization Tagging #313
dsafarian wants to merge 11 commits into
uc-cdis:masterfrom
dsafarian:fhir_transform

Conversation

@dsafarian

Copy link
Copy Markdown

New Features

  • Bulk FHIR Gen 3 Authorization Tagging (see more details with gen3 fhir --help or in the fhir.md in docs/howto)

Dependency updates

  • fhirpathpy

@dsafarian dsafarian changed the title Fhir transform Bulk FHIR Gen 3 Authorization Tagging Aug 19, 2026
Comment thread pyproject.toml
cdisutilstest = { git = "https://github.com/uc-cdis/cdisutils-test.git", tag = "2.0.0" }
indexd = { git = "https://github.com/uc-cdis/indexd.git", tag = "5.0.4" }
deptry = "^0.23.1"
setuptools = "<82"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why was this necessary? let's try without it

Comment thread docs/howto/fhir.md

`gen3 fhir --help`

For example, the following tags the 'Patient.ndjson' file with Gen3 authorization and outputs 'gen3_Patient.ndjson' using the authorization rules from 'config.yaml'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you add some more details about the configuration and how to configure different rules?

Comment thread docs/howto/fhir.md
Comment thread gen3/cli/fhir.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

let's add a README.md to this test_data directory that explains that this is all synthetic data generated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

and clarify which FHIR implementation guide / model. I assume this is the default FHIR model. Did you use a specific FHIR version?

Comment thread tests/test_fhir_transform.py
Comment thread gen3/fhir.py
Comment thread gen3/fhir.py
Comment thread gen3/fhir.py
Comment thread gen3/fhir.py
Comment thread gen3/fhir.py
# return rule["authz"]
for rule in self.rules:
match = evaluate(resource, rule["condition"])
if match and match[0] is True: # FIXME: what if multiple conditions match?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

for the FIXME: we should maybe log a warning

Comment thread gen3/fhir.py
Comment thread gen3/fhir.py
Comment thread gen3/fhir.py
resource["meta"]["security"] = []

gen3_security_tag = {
"system": "http://gen3.org/authz",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this path should be configuration or at least a global variable at the top of this file

Comment thread gen3/fhir.py
Comment thread gen3/fhir.py
Comment thread gen3/fhir.py
Comment thread gen3/fhir.py
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