Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new columns to table 'resources' #31

Open
kapsner opened this issue Dec 8, 2021 · 0 comments
Open

Add new columns to table 'resources' #31

kapsner opened this issue Dec 8, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@kapsner
Copy link
Member

kapsner commented Dec 8, 2021

For performance purposes / faster filtering etc. it would be good to have 3 additional columns available in the 'resources' table, namely:

  • Patient-ID:
    • REPLACE(jsonb_path_query(DATA, '$.subject') ->> 'reference', 'Patient/', '') or
    • DATA ->> 'id' (for resource-type = 'Patient')
  • Encounter-ID:
    • REPLACE(DATA -> 'encounter' ->> 'reference', 'Encounter/', '') [e.g. for resource-type = 'Condition']
    • DATA ->> 'id' (for resource-type = 'Encounter')
  • Encounter-Start-Date
    • to_timestamp(jsonb_path_query(DATA, '$.period') ->> 'start', 'YYYY-MM-DDTHH:MI:SS') [e.g. for resource-type = 'Encounter']
kapsner added a commit to kapsner/fhir-gateway that referenced this issue May 10, 2022
@kapsner kapsner added enhancement New feature or request help wanted Extra attention is needed labels May 17, 2022
makampf pushed a commit to kapsner/fhir-gateway that referenced this issue Aug 18, 2022
makampf pushed a commit to kapsner/fhir-gateway that referenced this issue Aug 19, 2022
makampf pushed a commit to kapsner/fhir-gateway that referenced this issue Aug 19, 2022
makampf pushed a commit to kapsner/fhir-gateway that referenced this issue Aug 19, 2022
makampf pushed a commit to kapsner/fhir-gateway that referenced this issue Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants