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

Remove section_name From Flatahb If segment_code Is Empty #339

Closed
hf-krechan opened this issue Jun 4, 2024 · 1 comment · Fixed by #341
Closed

Remove section_name From Flatahb If segment_code Is Empty #339

hf-krechan opened this issue Jun 4, 2024 · 1 comment · Fixed by #341
Assignees

Comments

@hf-krechan
Copy link
Collaborator

Today I learned: The name in the AHB documents on the left side is not the name of the segment group, it is the name of the segment.

So it doesn't make sense if we add this segment name in the lines, where we only have the segment group.

So the output for example of the 55001 should be

{
      "ahb_expression": "Kann",
      "data_element": null,
      "guid": "fba40a12-c494-4105-847a-46f7b5f01ef3",
      "index": 25,
      "name": "",
      "section_name": null,  <-- I changed this line
      "segment_code": null,  <-- because the segment_code is null
      "segment_group_key": "SG3",
      "value_pool_entry": null
    },
    {
      "ahb_expression": "Muss",
      "data_element": null,
      "guid": "cca45667-760e-4d1d-a123-a30c7acda5e7",
      "index": 26,
      "name": "",
      "section_name": "Ansprechpartner",
      "segment_code": "CTA",
      "segment_group_key": "SG3",
      "value_pool_entry": null
    }

You can find the current output here: https://github.com/Hochfrequenz/machine-readable_anwendungshandbuecher/blob/51c7d93e77fafea60c1acb3a9b2ca5fe26c51206/FV2310/UTILMD/flatahb/55001.json#L245-L266

@hf-kklein
Copy link
Contributor

just to note it somewhere: IIRC, the maus MIG/ahb mapping is based on lines with section name only:
https://github.com/Hochfrequenz/mig_ahb_utility_stack/blob/502b82bbe6062a5d59e56e3cb7a3ea74bb524f19/src/maus/mig_ahb_matching.py#L197

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.

3 participants