Hochfrequenz / mig_ahb_utility_stack

MIG AHB Utility Stack (MAUS): A Script to Match the Message Implementation Guide (MIG) with the Anwendungshandbuch (AHB)
MIT License
2 stars 0 forks source link

Fix address paths in 11042.maus #134

Closed hf-aschloegl closed 1 year ago

hf-aschloegl commented 2 years ago

(May also be relevant for other Prüfis and other fields.) If you have a look at the addresses, f.ex. in the 11042.maus you can see for the "Korrespondenzanschrift des Kunden des Messstellenbetreibers" that the Name, Ort, Postleitzahl, etc. only have their name as Discriminator/Path, but we need an EDISeedPath. This only works for "Struktur" which has $[\"Dokument\"][0][\"Nachricht\"][0][\"Vorgang\"][0][\"Korrespondenzanschrift des Kunden des Messstellenbetreibers\"][0][\"Struktur\"] as Discriminator/Path. We would expect and need this also for the other address fields. Example Ort:

At the moment this was hardcoded in https://github.com/Hochfrequenz/edifact-templates/pull/151/files (here you can also see reality vs. expections). ⚠You need to look out to not overwrite this state for the wimbee-backend.

hf-kklein commented 2 years ago
<class name="Korrespondenzanschrift des Kunden des Messstellenbetreibers" ref="SG12" key="NAD:5:(0,3)[NAD:1:0=Z08]" meta.objType="Personen">
  <field name="Name des Beteiligten" ref="NAD:4:0" meta.id="3036" meta.orderId="2" />
  <field name="Name des Beteiligten1" ref="NAD:4:1" meta.id="3036" meta.orderId="3" />
  <field name="Name des Beteiligten2" ref="NAD:4:2" meta.id="3036" meta.orderId="4" />
  <field name="Name des Beteiligten3" ref="NAD:4:3" meta.id="3036" meta.orderId="5" />
  <field name="Name des Beteiligten4" ref="NAD:4:4" meta.id="3036" meta.orderId="6" />
  <field name="Typ" ref="NAD:4:5" ahbName="Struktur" meta.id="3045" meta.type="repository" meta.typeInfo="Kundentyprepository" meta.orderId="1" />
  <field name="Strasse und Hausnummer oder Postfach" ref="NAD:5:0" meta.id="3042" />
  <field name="Strasse und Hausnummer oder Postfach1" ref="NAD:5:1" meta.id="3042" />
  <field name="Strasse und Hausnummer oder Postfach2" ref="NAD:5:2" meta.id="3042" />
  <field name="Strasse und Hausnummer oder Postfach3" ref="NAD:5:3" meta.id="3042" />
  <field name="Ort" ref="NAD:6:0" meta.id="3164" />
  <field name="PLZ" ref="NAD:8:0" meta.id="3251" ahbName="Postleitzahl" />
  <field name="Land" ref="NAD:9:0" meta.id="3207" ahbName="Ländername, Code" />
</class>
hf-kklein commented 1 year ago

Solved in maus 0.3.1 see https://github.com/Hochfrequenz/edifact-templates/blob/db6b9eb6597ac76d0cbd6cb8df919090dc5c8b00/maus/FV2210/UTILMD/11042_maus.json#L446