zdavatz / amiko-osx

AmiKo Desitin for AmiKo OS X
https://apps.apple.com/ch/app/amiko-desitin/id708142753?mt=12
GNU General Public License v3.0
3 stars 2 forks source link

Medidata Validation Error `'eanPartyType` #200

Closed zdavatz closed 3 years ago

zdavatz commented 3 years ago

Sending this document testxml.xml.txt

wie currently still get this response:

ValidationException: The given document does not conform to the schema[medidata/definition/xsd/geninv-req-v45]. Error report[ValidationViolationBean{publicId=null, columnNumber=511, lineNumber=1, systemId=null, message=cvc-pattern-valid: Value '' is not facet-valid with respect to pattern '([0-9]{13})' for type 'eanPartyType'.}, ValidationViolationBean{publicId=null, columnNumber=511, lineNumber=1, systemId=null, message=cvc-attribute.3: The value '' of attribute 'to' on element 'invoice:transport' is not valid with respect to its type, 'eanPartyType'.}, ValidationViolationBean{publicId=null, columnNumber=1508, lineNumber=1, systemId=null, message=cvc-pattern-valid: Value '' is not facet-valid with respect to pattern '([0-9]{13})' for type 'eanPartyType'.}, ValidationViolationBean{publicId=null, columnNumber=1508, lineNumber=1, systemId=null, message=cvc-attribute.3: The value '' of attribute 'ean_party' on element 'invoice:debitor' is not valid with respect to its type, 'eanPartyType'.}, ValidationViolationBean{publicId=null, columnNumber=1834, lineNumber=1, systemId=null, message=cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type 'stringType1_25'.}]
luetm commented 3 years ago

Gab einige Fehler gegen das XSD. Hier ist eine gültige Variane:


<invoice:request language="de" modus="production" validation_status="0" xmlns="http://www.forum-datenaustausch.ch/invoice" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:invoice="http://www.forum-datenaustausch.ch/invoice" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.forum-datenaustausch.ch/invoice generalInvoiceRequest_450.xsd">
    <invoice:processing>
        <invoice:transport from="2099988876514" to="2099988876514">
            <invoice:via sequence_id="1" via="7601001304307"/>
        </invoice:transport>
    </invoice:processing>
    <invoice:payload copy="0" storno="0" type="invoice">
        <invoice:invoice request_date="2021-07-26T10:47:00" request_id="5E984C1E-2434-449C-86FD-B60805" request_timestamp="1627285620"/>
        <invoice:body place="practice" role="physician">
            <invoice:prolog>
                <invoice:package copyright="(c) 2021 Ywesee GmbH" name="Ywesee" version="2021"/>
                <invoice:generator copyright="(c) 2021 Ywesee GmbH" name="AmiKo" version="3430"/>
            </invoice:prolog>
            <invoice:tiers_payant>
                <invoice:biller ean_party="2099988876514" zsr="U666666">
                    <invoice:person title="Dr. med.">
                        <invoice:familyname>Davatz</invoice:familyname>
                        <invoice:givenname>Zeno</invoice:givenname>
                        <invoice:postal>
                            <invoice:street>Winterthurerstrasse 52</invoice:street>
                            <invoice:zip>8006</invoice:zip>
                            <invoice:city>Baden</invoice:city>
                        </invoice:postal>
                    </invoice:person>
                </invoice:biller>
                <invoice:debitor ean_party="2099988876514">
                    <invoice:person salutation="Herr">
                        <invoice:familyname>Davatz</invoice:familyname>
                        <invoice:givenname>Zeno</invoice:givenname>
                        <invoice:postal>
                            <invoice:street>Winterthurerstrasse 52</invoice:street>
                            <invoice:zip>8006</invoice:zip>
                            <invoice:city>Zürich</invoice:city>
                        </invoice:postal>
                        <invoice:telecom>
                            <invoice:phone>+41 555 55 55</invoice:phone>
                        </invoice:telecom>
                        <invoice:online>
                            <invoice:email>hello@davatz.info</invoice:email>
                        </invoice:online>
                    </invoice:person>
                </invoice:debitor>
                <invoice:provider ean_party="2099988876514" zsr="U666666">
                    <invoice:person title="Dr. med.">
                        <invoice:familyname>Davatz</invoice:familyname>
                        <invoice:givenname>Zeno</invoice:givenname>
                        <invoice:postal>
                            <invoice:street>Winterthurerstrasse 52</invoice:street>
                            <invoice:zip>8006</invoice:zip>
                            <invoice:city>Baden</invoice:city>
                        </invoice:postal>
                    </invoice:person>
                </invoice:provider>
                <invoice:insurance ean_party="2099988876514">
                    <company>
                        <invoice:companyname>Insurance</invoice:companyname>
                        <invoice:postal>
                            <invoice:zip>8000</invoice:zip>
                            <invoice:city>Zürich</invoice:city>
                        </invoice:postal>
                    </company>
                </invoice:insurance>
                <invoice:patient birthdate="1975-05-20T00:00:00+03:00" gender="male">
                    <invoice:person salutation="Herr">
                        <invoice:familyname>Davatz</invoice:familyname>
                        <invoice:givenname>Zeno</invoice:givenname>
                        <invoice:postal>
                            <invoice:street>Winterthurerstrasse 52</invoice:street>
                            <invoice:zip>8006</invoice:zip>
                            <invoice:city>Zürich</invoice:city>
                        </invoice:postal>
                        <invoice:telecom>
                            <invoice:phone>+41 555 55 55</invoice:phone>
                        </invoice:telecom>
                        <invoice:online>
                            <invoice:email>hello@davatz.info</invoice:email>
                        </invoice:online>
                    </invoice:person>
                    <invoice:card card_id="na" expiry_date="2023-12-31T00:00:00+02:00"/>
                </invoice:patient>
                <invoice:guarantor>
                    <invoice:person salutation="Herr">
                        <invoice:familyname>Davatz</invoice:familyname>
                        <invoice:givenname>Zeno</invoice:givenname>
                        <invoice:postal>
                            <invoice:street>Winterthurerstrasse 52</invoice:street>
                            <invoice:zip>8006</invoice:zip>
                            <invoice:city>Zürich</invoice:city>
                        </invoice:postal>
                        <invoice:telecom>
                            <invoice:phone>+41 555 55 55</invoice:phone>
                        </invoice:telecom>
                        <invoice:online>
                            <invoice:email>hello@davatz.info</invoice:email>
                        </invoice:online>
                    </invoice:person>
                </invoice:guarantor>
                <invoice:balance amount="0" amount_due="0" currency="CHF">
                    <invoice:vat vat="0">
                        <invoice:vat_rate amount="0" vat="0" vat_rate="2.5"/>
                    </invoice:vat>
                </invoice:balance>
            </invoice:tiers_payant>
            <invoice:esrQR iban="CH870025125183002401Z" reference_number="000000000000053300614247357" type="esrQR">
                <invoice:bank>
                    <invoice:person title="Dr. med.">
                        <invoice:familyname>Davatz</invoice:familyname>
                        <invoice:givenname>Zeno</invoice:givenname>
                        <invoice:postal>
                            <invoice:street>Winterthurerstrasse 52</invoice:street>
                            <invoice:zip>8006</invoice:zip>
                            <invoice:city>Baden</invoice:city>
                        </invoice:postal>
                    </invoice:person>
                </invoice:bank>
                <invoice:creditor>
                    <invoice:person title="Dr. med.">
                        <invoice:familyname>Davatz</invoice:familyname>
                        <invoice:givenname>Zeno</invoice:givenname>
                        <invoice:postal>
                            <invoice:street>Winterthurerstrasse 52</invoice:street>
                            <invoice:zip>8006</invoice:zip>
                            <invoice:city>Baden</invoice:city>
                        </invoice:postal>
                    </invoice:person>
                </invoice:creditor>
            </invoice:esrQR>
            <invoice:kvg insured_id="209-17-965"/>
            <invoice:treatment canton="ZH" date_begin="2021-07-26T10:47:00" date_end="2021-07-26T10:47:00" reason="disease"/>
            <invoice:services>
                <invoice:service amount="14.10" code="7680507660124" date_begin="2021-01-25T00:00:00" name="TOBRADEX Gtt Opht 5 ml" obligation="1" provider_id="2099988876514" quantity="1" record_id="1" responsible_id="2099988876514" service_attributes="0" session="1" tariff_type="402" unit="14.1" unit_factor="1" vat_rate="2.5"/>
            </invoice:services>
        </invoice:body>
    </invoice:payload>
</invoice:request>
luetm commented 3 years ago

Zip Datei mit XSDs: https://www.forum-datenaustausch.ch/fileadmin/fda_documents/4.5/Rechnungen/XML/XML_Schema_generalInvoiceRequest_450.zip

Die XSDs in die gleichen Ordner stellen wie die zu validierende XML Datei, dann mit dem XML Tool von Notepad++ validieren, wie hier beschrieben.

zdavatz commented 3 years ago

image (1) image (2) image

b123400 commented 3 years ago

This is my XML file, which has the correct ean party Untitled.txt

zdavatz commented 3 years ago

This is my XML file, which has the correct ean party Untitled.txt

I do not see any packages in this XML.

b123400 commented 3 years ago

Sorry, this is the file: Untitled.txt

zdavatz commented 3 years ago

this Error-Log helped: https://gist.github.com/zdavatz/a395e9202e131bec440b97bf33c67d92