coop-care / paid

PAID is library for care billing with payers in Germany according to § 105 SGB XI and § 302 SGB V. The project name is an acronym and stands for "Pflegeabrechnung in Deutschland".
GNU Lesser General Public License v3.0
10 stars 3 forks source link

Parsing Pflegehilfsmittelverzeichnisse #26

Closed michaelkamphausen closed 3 years ago

michaelkamphausen commented 3 years ago

We need a parser for the Bundeseinheitliches Hilfsmittel- und Pflegehilfsmittelverzeichnis (~68 MB XML). Input is XML, output should be JSON. We probably only need a small part of the data, maybe just the names and the numbers ((Pflege-)Hilfsmittelpositionsnummern) as options for a searchable select box.

westnordost commented 3 years ago

Had a short look at it. This looks like the kind of structured data that would also be an ideal fit for a database table. What makes this file big is the "Merkmale" field. Are you sure it can be dropped? If the user should input the numbers, where did he get the numbers from? If he doesn't necessarily have the numbers, he needs the name but maybe also the description as provided in the Merkmale field. Example:

<hv:HMV_PRODUKT>
    <hv:GRUPPE>19</hv:GRUPPE>
    <hv:ORT>40</hv:ORT>
    <hv:UNTERGRUPPE>1</hv:UNTERGRUPPE>
    <hv:ART>6</hv:ART>
    <hv:PRODUKT>113</hv:PRODUKT>
    <hv:BEZEICHNUNG>Kindertherapiebett Savoir-Vivre, Art.-Nr. 175.45.504.99.100 mit 99.700</hv:BEZEICHNUNG>
    <hv:HERSTELLER>SAVI MÖBEL GmbH</hv:HERSTELLER>
    <hv:MERKMALE>Kinderbett aus gewachstem Kiefernholz.&#xd;
        Größe der Liegefläche:       200 x 100 cm &#xd;
        Ausführung der Liegefläche:  Holzlamellen&#xd;
        Teilung der Liegefläche:     5-fach geteilt&#xd;
        Liegehöhe:                   40 - 80 cm (Herstellerangabe)&#xd;
        Höhenverstellung:            elektromotorisch&#xd;
        Rückenlehne:                 elektromotorisch&#xd;
        Schenkellehne:               elektromotorisch&#xd;
        Unterschenkellehne:          -&#xd;
        Sonstige Verstellungen:      -&#xd;
        Sperreinrichtung:            in Handschalter integriert    &#xd;
                                     (IPROXX SE)&#xd;
        Potentialausgleichanschluss: ja&#xd;
        Seitengitter:                Holzseitengitter, integriert, &#xd;
                                     4-flügelige Faltschiebetür auf &#xd;
                                     einer Längsseite&#xd;
        Seitengitterhöhe:            125 cm&#xd;
        Bettgalgen:                  -&#xd;
        Sichere Arbeitslast:         150 kg&#xd;
    </hv:MERKMALE>
</hv:HMV_PRODUKT>
<hv:HMV_PRODUKT>
    <hv:GRUPPE>19</hv:GRUPPE>
    <hv:ORT>40</hv:ORT>
    <hv:UNTERGRUPPE>1</hv:UNTERGRUPPE>
    <hv:ART>6</hv:ART>
    <hv:PRODUKT>114</hv:PRODUKT>
    <hv:BEZEICHNUNG>Kindertherapiebett Savoir-Vivre, Art.-Nr. 150.45.504.99.100 mit 99.700</hv:BEZEICHNUNG>
    <hv:HERSTELLER>SAVI MÖBEL GmbH</hv:HERSTELLER>
    <hv:MERKMALE>Kinderbett aus gewachstem Kiefernholz.&#xd;
        Größe der Liegefläche:       200 x 100 cm &#xd;
        Ausführung der Liegefläche:  Holzlamellen&#xd;
        Teilung der Liegefläche:     5-fach geteilt&#xd;
        Liegehöhe:                   40 - 80 cm (Herstellerangabe)&#xd;
        Höhenverstellung:            elektromotorisch&#xd;
        Rückenlehne:                 elektromotorisch&#xd;
        Schenkellehne:               elektromotorisch&#xd;
        Unterschenkellehne:          -&#xd;
        Sonstige Verstellungen:      -&#xd;
        Sperreinrichtung:            in Handschalter integriert    &#xd;
                                     (IPROXX SE)&#xd;
        Potentialausgleichanschluss: ja&#xd;
        Seitengitter:                Holzseitengitter, integriert, &#xd;
                                     4-flügelige Faltschiebetür auf &#xd;
                                     einer Längsseite&#xd;
        Seitengitterhöhe:            100 cm&#xd;
        Bettgalgen:                  -&#xd;
        Sichere Arbeitslast:         150 kg&#xd;
    </hv:MERKMALE>
</hv:HMV_PRODUKT>

These two products are both named "Savoir-Vivre", just a slightly different Art. Nr. The real life difference can be read in the description field: The railing is higher for the one than for the other.

Maybe this could be a question for your care provider contacts - how do they input this data in the current software they are using, where do they have the numbers from? (I guess it would be realistic to assume that they already have a (digital) catalog for this so they indeed do have the numbers - but which ones?)

michaelkamphausen commented 3 years ago

Nice find. 😀 Yes, I should talk with a care provider about it.

I thought of an autosuggest select box where the product is selected by name while the Hilfsmittelpositionsnummer (composed as Gruppe.Ort.Untergruppe.Art.Produkt) is the internal value for each option. The goal is that the select box provides the Hilfsmittelpositionsnummer internally, so nobody has to remember it. Just in case, the select box search could be extended to additionally work for directly entering the Hilfsmittelpositionsnummer or even the names of the product categories. For the example you found, I expect the user to have the product or the product's invoice at hand and check the article number. But maybe it turns out we need the description as well. Let's see what the nurses say. I'm just trying to start with the simplest solution.

westnordost commented 3 years ago

You mean "Gruppe.Ort.Untergruppe.Art.Produkt" should be one field?

westnordost commented 3 years ago

Hm the "Pos.-Nr." are referred to througout the XML like this "Pos.-Nr. 18.99.99.0503".

So it has four elements, not five. I found out that Art and Produkt are simply concatenated.

westnordost commented 3 years ago

And this works because Art seems to be always just a single digit

michaelkamphausen commented 3 years ago

Sounds reasonable.