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 Condition Into Flatahb Output #337

Closed
hf-krechan opened this issue Jun 4, 2024 · 0 comments · Fixed by #353
Closed

Add Condition Into Flatahb Output #337

hf-krechan opened this issue Jun 4, 2024 · 0 comments · Fixed by #353
Assignees

Comments

@hf-krechan
Copy link
Collaborator

For the AHB Tabellen (alias AHBesser) frontend we would like to add the condition texts.

At the moment this information is missing in the flatahb json files

For example in the 55001

{
      "ahb_expression": "X [931][494]",
      "data_element": "2380",
      "guid": "a554bcf2-1a61-4b65-8a21-1f5a7ed86941",
      "index": 15,
      "name": "Datum oder Uhrzeit oderZeitspanne, Wert",
      "section_name": "Nachrichtendatum",
      "segment_code": "DTM",
      "segment_group_key": null,
      "value_pool_entry": null
    },

Source: https://github.com/Hochfrequenz/machine-readable_anwendungshandbuecher/blob/51c7d93e77fafea60c1acb3a9b2ca5fe26c51206/FV2310/UTILMD/flatahb/55001.json#L136-L145

This information about what is behind the [931] is already parsed and available in the csv output: https://github.com/Hochfrequenz/machine-readable_anwendungshandbuecher/blob/51c7d93e77fafea60c1acb3a9b2ca5fe26c51206/FV2310/UTILMD/csv/55001.csv#L14-L15

12,Nachrichtendatum,,DTM,2380,,,"Datum oder Uhrzeit oderZeitspanne, Wert",X [931][494],"[494] Das hier genannte Datum muss der Zeitpunkt sein, zu dem das Dokument erstellt wurde, oder ein Zeitpunkt, der davor liegt  
[931] Format: ZZZ = +00"

This should be part of the json file too.

Example output

The conditions should be in a list.

{
  "ahb_expression": "X [931][494]",
  "conditions": [
    "[494] Das hier genannte Datum muss der Zeitpunkt sein, zu dem das Dokument erstellt wurde, oder ein Zeitpunkt, der davor liegt",
    "[931] Format: ZZZ = +00"
  ]"data_element": "2380",
  "guid": "a554bcf2-1a61-4b65-8a21-1f5a7ed86941",
  "index": 15,
  "name": "Datum oder Uhrzeit oderZeitspanne, Wert",
  "section_name": "Nachrichtendatum",
  "segment_code": "DTM",
  "segment_group_key": null,
  "value_pool_entry": null
},
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 a pull request may close this issue.

2 participants