<?xml version='1.0' encoding='utf-8'?>
<!--
  FFFD1E - Utopia laboratory test report (generation 3 demo).

  A blood test summary printed by a medical laboratory of Aurora, Republic of Utopia, on the
  first page of the full report. The doctor, a hospital admissions desk or the patient scans
  the seal to check that the results are the ones the laboratory signed. The summary carries
  no name: the patient is a pseudonymous reference, and the view shows only its prefix.

  Ported from the BioSeal SDK test corpus (bioseal-sdk test/manifests/gen3/health/ffd021.xml);
  there is no v1 POC use case. What generation 3 shows:
  - every typed array kind of a payload: each analyte is one position across parallel arrays,
    a StringArray of LOINC codes in C40, a FloatArray of results, a StringArray of units, a
    BooleanArray of out-of-range flags and an IntegerArray of method codes;
  - dictionaries on array items: the LOINC codes read as analyte names, the Boolean flags as
    "within / outside the reference range" (the 2.9 validator refuses a dictionary on Integer
    items, so the method codes stay numbers);
  - a Timestamp (the sampling time) with bs:DateFormat, a built-in ISO 639-1 language list;
  - bs:DisplayHint Mask (Show FIRST, a custom '#' character) on the patient reference: display
    only, the value is signed in full;
  - a DataMatrix in BASE16 (bs:IssuanceParameters), small enough for a tube label;
  - NO custom presentation view: the SDK's generic view lays the report out from the manifest
    (labels, groups, dictionaries, dates) in English and French.
--><Manifest xmlns="https://gov.otentik.codes/schemas/manifest/v3" xmlns:ext="urn:vdsic:manifest:extensions:3" xmlns:bs="urn:id3:bioseal:manifest:extensions:3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1">
    <Id>FFFD1E</Id>
    <Version>1</Version>
    <Name>
        <Value xml:lang="en">Laboratory test report</Value>
        <Value xml:lang="fr">Compte rendu d'analyses</Value>
    </Name>
    <Description>
        <Value xml:lang="en">Demo: blood test results of a medical laboratory, as typed parallel arrays, for a pseudonymous patient reference.</Value>
        <Value xml:lang="fr">Démo : résultats d'analyses sanguines d'un laboratoire de biologie médicale, en tableaux typés parallèles, pour une référence patient pseudonyme.</Value>
    </Description>
    <Schema>
        <Payload>
            <Fields>
                <String name="report_id">
                    <StringConstraints>
                        <MinLength>6</MinLength>
                        <MaxLength>12</MaxLength>
                        <Pattern>^[A-Z0-9]{6,12}$</Pattern>
                        <Encoding>C40</Encoding>
                    </StringConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Report number</ext:Value>
                        <ext:Value xml:lang="fr">Numéro de compte rendu</ext:Value>
                    </Extension>
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:Placeholder xml:lang="en">LB261123117</bs:Placeholder>
                        <bs:Placeholder xml:lang="fr">LB261123117</bs:Placeholder>
                    </Extension>
                    <Extension xsi:type="bs:DisplayHintExtensionType">
                        <bs:Emphasis>SECONDARY</bs:Emphasis>
                    </Extension>
                </String>
                <String name="laboratory">
                    <StringConstraints>
                        <MaxLength>40</MaxLength>
                    </StringConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Laboratory</ext:Value>
                        <ext:Value xml:lang="fr">Laboratoire</ext:Value>
                    </Extension>
                    <Extension xsi:type="bs:DefaultValueExtensionType">
                        <bs:Static>Laboratoire central d'Aurora</bs:Static>
                    </Extension>
                    <Extension xsi:type="bs:DisplayHintExtensionType">
                        <bs:Emphasis>PRIMARY</bs:Emphasis>
                    </Extension>
                </String>
                <String name="patient_reference">
                    <StringConstraints>
                        <MinLength>11</MinLength>
                        <MaxLength>11</MaxLength>
                        <Pattern>^P-[0-9]{3}-[0-9]{5}$</Pattern>
                    </StringConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Patient reference</ext:Value>
                        <ext:Value xml:lang="fr">Référence patient</ext:Value>
                    </Extension>
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:Placeholder xml:lang="en">P-000-88412</bs:Placeholder>
                        <bs:Placeholder xml:lang="fr">P-000-88412</bs:Placeholder>
                        <bs:HelpText xml:lang="en">The laboratory's pseudonymous reference, never the patient's name.</bs:HelpText>
                        <bs:HelpText xml:lang="fr">La référence pseudonyme du laboratoire, jamais le nom du patient.</bs:HelpText>
                    </Extension>
                    <!-- The view shows the reference's prefix only; display only, the value is
                         signed in full. -->
                    <Extension xsi:type="bs:DisplayHintExtensionType">
                        <bs:Mask Show="FIRST" Count="2" Char="#"/>
                    </Extension>
                </String>
                <Timestamp name="sampled_at">
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Sampled at</ext:Value>
                        <ext:Value xml:lang="fr">Prélevé le</ext:Value>
                    </Extension>
                    <Extension xsi:type="bs:DateFormatExtensionType">
                        <bs:Pattern>%d/%m/%Y %H:%M</bs:Pattern>
                        <bs:Pattern xml:lang="en">%d %B %Y, %H:%M</bs:Pattern>
                        <bs:Pattern xml:lang="fr">%d/%m/%Y à %H:%M</bs:Pattern>
                    </Extension>
                </Timestamp>
                <StringArray name="analytes">
                    <ArrayConstraints>
                        <MinSize>1</MinSize>
                        <MaxSize>10</MaxSize>
                    </ArrayConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Analytes</ext:Value>
                        <ext:Value xml:lang="fr">Analyses</ext:Value>
                    </Extension>
                    <Extension xsi:type="ext:DictionaryLookupExtensionType">
                        <ext:Dictionary>analyte</ext:Dictionary>
                    </Extension>
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:HelpText xml:lang="en">LOINC code, with a space for the hyphen (2345 7). One position per analyte, the same in every result list.</bs:HelpText>
                        <bs:HelpText xml:lang="fr">Code LOINC, avec une espace à la place du tiret (2345 7). Une position par analyse, la même dans chaque liste de résultats.</bs:HelpText>
                        <bs:ItemLabel xml:lang="en">Analyte</bs:ItemLabel>
                        <bs:ItemLabel xml:lang="fr">Analyse</bs:ItemLabel>
                        <bs:AddLabel xml:lang="en">Add an analyte</bs:AddLabel>
                        <bs:AddLabel xml:lang="fr">Ajouter une analyse</bs:AddLabel>
                    </Extension>
                    <StringConstraints>
                        <MaxLength>7</MaxLength>
                        <Pattern>^(2345 7|718 7|2093 3|2085 9|2571 8|2160 0|2951 2|2823 3)$</Pattern>
                        <Encoding>C40</Encoding>
                    </StringConstraints>
                </StringArray>
                <FloatArray name="values">
                    <ArrayConstraints>
                        <MinSize>1</MinSize>
                        <MaxSize>10</MaxSize>
                    </ArrayConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Results</ext:Value>
                        <ext:Value xml:lang="fr">Résultats</ext:Value>
                    </Extension>
                    <FloatConstraints>
                        <Min>0</Min>
                        <Max>100000</Max>
                    </FloatConstraints>
                </FloatArray>
                <StringArray name="units">
                    <ArrayConstraints>
                        <MinSize>1</MinSize>
                        <MaxSize>10</MaxSize>
                    </ArrayConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Units</ext:Value>
                        <ext:Value xml:lang="fr">Unités</ext:Value>
                    </Extension>
                    <StringConstraints>
                        <MaxLength>8</MaxLength>
                    </StringConstraints>
                </StringArray>
                <BooleanArray name="out_of_range">
                    <ArrayConstraints>
                        <MinSize>1</MinSize>
                        <MaxSize>10</MaxSize>
                    </ArrayConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Reference range</ext:Value>
                        <ext:Value xml:lang="fr">Valeurs de référence</ext:Value>
                    </Extension>
                    <Extension xsi:type="ext:DictionaryLookupExtensionType">
                        <ext:Dictionary>range</ext:Dictionary>
                    </Extension>
                </BooleanArray>
                <IntegerArray name="method_codes">
                    <ArrayConstraints>
                        <MaxSize>10</MaxSize>
                    </ArrayConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Method codes</ext:Value>
                        <ext:Value xml:lang="fr">Codes méthode</ext:Value>
                    </Extension>
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:HelpText xml:lang="en">The laboratory's own method codes, listed in the full report.</bs:HelpText>
                        <bs:HelpText xml:lang="fr">Les codes méthode propres au laboratoire, détaillés dans le compte rendu complet.</bs:HelpText>
                    </Extension>
                    <IntegerConstraints>
                        <Min>0</Min>
                        <Max>65535</Max>
                    </IntegerConstraints>
                </IntegerArray>
                <String name="report_language">
                    <StringConstraints>
                        <MinLength>2</MinLength>
                        <MaxLength>2</MaxLength>
                        <Pattern>^[a-z]{2}$</Pattern>
                    </StringConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Language of the full report</ext:Value>
                        <ext:Value xml:lang="fr">Langue du compte rendu complet</ext:Value>
                    </Extension>
                    <Extension xsi:type="ext:DictionaryLookupExtensionType">
                        <ext:Standard>ISO639:1</ext:Standard>
                    </Extension>
                    <Extension xsi:type="bs:DefaultValueExtensionType">
                        <bs:Static>fr</bs:Static>
                    </Extension>
                </String>
                <!-- The issuance service that produced the seal (ext:IssuanceService): the
                     platform writes its CIN, the verifier checks it against the Scheme List.
                     Neither the issuance form (Entry PLATFORM) nor any view (NEVER) shows it. -->
                <String name="issuance_service">
                    <StringConstraints>
                        <MinLength>3</MinLength>
                        <MaxLength>3</MaxLength>
                        <Pattern>^[A-Z0-9]{3}$</Pattern>
                        <Encoding>C40</Encoding>
                    </StringConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Issuance service</ext:Value>
                        <ext:Value xml:lang="fr">Service d'émission</ext:Value>
                    </Extension>
                    <Extension xsi:type="ext:VisibilityExtensionType">
                        <ext:Condition xsi:type="ext:ApplicationConditionType">
                            <ext:Value>NEVER</ext:Value>
                        </ext:Condition>
                    </Extension>
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:Entry>PLATFORM</bs:Entry>
                    </Extension>
                </String>
            </Fields>
        </Payload>
    </Schema>
    <Extensions>
        <Extension xsi:type="ext:DictionariesExtensionType">
            <ext:Dictionary name="analyte">
                <ext:Entry key="2345 7"><ext:Value xml:lang="en">Glucose</ext:Value><ext:Value xml:lang="fr">Glucose</ext:Value></ext:Entry>
                <ext:Entry key="718 7"><ext:Value xml:lang="en">Haemoglobin</ext:Value><ext:Value xml:lang="fr">Hémoglobine</ext:Value></ext:Entry>
                <ext:Entry key="2093 3"><ext:Value xml:lang="en">Total cholesterol</ext:Value><ext:Value xml:lang="fr">Cholestérol total</ext:Value></ext:Entry>
                <ext:Entry key="2085 9"><ext:Value xml:lang="en">HDL cholesterol</ext:Value><ext:Value xml:lang="fr">Cholestérol HDL</ext:Value></ext:Entry>
                <ext:Entry key="2571 8"><ext:Value xml:lang="en">Triglycerides</ext:Value><ext:Value xml:lang="fr">Triglycérides</ext:Value></ext:Entry>
                <ext:Entry key="2160 0"><ext:Value xml:lang="en">Creatinine</ext:Value><ext:Value xml:lang="fr">Créatinine</ext:Value></ext:Entry>
                <ext:Entry key="2951 2"><ext:Value xml:lang="en">Sodium</ext:Value><ext:Value xml:lang="fr">Sodium</ext:Value></ext:Entry>
                <ext:Entry key="2823 3"><ext:Value xml:lang="en">Potassium</ext:Value><ext:Value xml:lang="fr">Potassium</ext:Value></ext:Entry>
            </ext:Dictionary>
            <ext:Dictionary name="range">
                <ext:Entry key="false"><ext:Value xml:lang="en">Within</ext:Value><ext:Value xml:lang="fr">Dans les normes</ext:Value></ext:Entry>
                <ext:Entry key="true"><ext:Value xml:lang="en">Outside</ext:Value><ext:Value xml:lang="fr">Hors normes</ext:Value></ext:Entry>
            </ext:Dictionary>
        </Extension>
        <Extension xsi:type="ext:PoliciesExtensionType">
            <ext:AuthorizedUsage>
                <ext:oid>1.3.6.1.4.1.51528.1.1</ext:oid>
                <ext:uuid>0945dbd91c8d425685733a4c7eee3a6a</ext:uuid>
            </ext:AuthorizedUsage>
            <!-- No VDSValidityPeriod: a test result stays what the laboratory measured. -->
            <bs:CertificateValidity>
                <bs:ExpiryDateGracePeriod><bs:Value>30</bs:Value><bs:Unit>DAYS</bs:Unit></bs:ExpiryDateGracePeriod>
                <bs:RevocationInfoGracePeriod><bs:Value>2</bs:Value><bs:Unit>DAYS</bs:Unit></bs:RevocationInfoGracePeriod>
            </bs:CertificateValidity>
        </Extension>
        <Extension xsi:type="ext:IssuanceServiceExtensionType">
            <ext:PayloadField>issuance_service</ext:PayloadField>
        </Extension>
        <Extension xsi:type="bs:IssuancePoliciesExtensionType">
            <bs:KeyProtection>
                <bs:MinimumLevel>L1</bs:MinimumLevel>
                <bs:Rationale>
                    <bs:Value xml:lang="en">Demo: signed with a software key; a production issuer declares a stronger level.</bs:Value>
                    <bs:Value xml:lang="fr">Démo : signé avec une clé logicielle ; un émetteur en production déclare un niveau supérieur.</bs:Value>
                </bs:Rationale>
            </bs:KeyProtection>
        </Extension>
        <Extension xsi:type="bs:AdditionalInformationExtensionType">
            <bs:DataPrivacy>
                <bs:Value xml:lang="en">The seal carries test results but no name: the patient is a pseudonymous laboratory reference, of which the view shows only the first characters. Only the laboratory can link it to a person.</bs:Value>
                <bs:Value xml:lang="fr">Le cachet contient des résultats d'analyses mais aucun nom : le patient est une référence pseudonyme du laboratoire, dont la vue n'affiche que les premiers caractères. Seul le laboratoire peut la rattacher à une personne.</bs:Value>
            </bs:DataPrivacy>
            <bs:PointOfContact>
                <bs:Value xml:lang="en">contact@id3.eu</bs:Value>
                <bs:Value xml:lang="fr">contact@id3.eu</bs:Value>
            </bs:PointOfContact>
        </Extension>
        <Extension xsi:type="bs:IssuanceParametersExtensionType">
            <bs:Encoding>BASE16</bs:Encoding>
            <bs:Symbology>DATAMATRIX</bs:Symbology>
            <bs:DatamatrixParameters>
                <bs:Margin>1</bs:Margin>
            </bs:DatamatrixParameters>
        </Extension>
        <Extension xsi:type="bs:FieldGroupsExtensionType">
            <bs:Group Name="sample" Scope="BOTH">
                <bs:Label xml:lang="en">Sample</bs:Label>
                <bs:Label xml:lang="fr">Prélèvement</bs:Label>
                <bs:PayloadField>laboratory</bs:PayloadField>
                <bs:PayloadField>report_id</bs:PayloadField>
                <bs:PayloadField>patient_reference</bs:PayloadField>
                <bs:PayloadField>sampled_at</bs:PayloadField>
                <bs:PayloadField>report_language</bs:PayloadField>
            </bs:Group>
            <bs:Group Name="results" Scope="BOTH">
                <bs:Label xml:lang="en">Results</bs:Label>
                <bs:Label xml:lang="fr">Résultats</bs:Label>
                <bs:Description xml:lang="en">One position per analyte: the first result, unit, range and method belong to the first analyte, and so on.</bs:Description>
                <bs:Description xml:lang="fr">Une position par analyse : le premier résultat, la première unité, norme et méthode se rapportent à la première analyse, et ainsi de suite.</bs:Description>
                <bs:PayloadField>analytes</bs:PayloadField>
                <bs:PayloadField>values</bs:PayloadField>
                <bs:PayloadField>units</bs:PayloadField>
                <bs:PayloadField>out_of_range</bs:PayloadField>
                <bs:PayloadField>method_codes</bs:PayloadField>
            </bs:Group>
        </Extension>
    </Extensions>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"/><ds:Reference URI=""><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>s7cSM2gPdqsKTyuh45D7aF12AlbBWESUEk6VczVC7Bg=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>LqNuvHCSAKtE/MjAC++uan0j5jkYjnEt/NCqV6vUQAprSG8zZPVUG+jOCsuYkbjVAmDI01WShebv+44PD8824A==</ds:SignatureValue><ds:KeyInfo><ds:X509Data><ds:X509Certificate>MIIDODCCAr6gAwIBAgIIHIOg/q3eBccwCgYIKoZIzj0EAwMwPTEdMBsGA1UEAwwUVmlzaWJsZSBTZWFsIFJvb3QgQ0ExDzANBgNVBAoMBklOQ0VSVDELMAkGA1UEBhMCTFUwHhcNMjYwMjA5MTY1NjQ5WhcNMjkwMjA4MTY1NjQ4WjCBjTEYMBYGCgmSJomT8ixkAQEMCENCODBBQjhGMSwwKgYDVQQDDCNpZDMgVGVjaG5vbG9naWVzIC0gT3RlbnRpayBNYW5pZmVzdDEaMBgGA1UECwwRSUQgMyBURUNITk9MT0dJRVMxGjAYBgNVBAoMEUlEIDMgVEVDSE5PTE9HSUVTMQswCQYDVQQGEwJGUjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCYIqSmOgyvlbmslWH0HQypYlKsrvdkuuayp5ZJZ6nOs5DK+6C1z8yR931KeTopU8MVV6XBBAYAbNA6Kv60yRTijggFVMIIBUTAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFCGhTeB27aTBB5FSMvHxKdsfjOdIMEQGCCsGAQUFBwEBBDgwNjA0BggrBgEFBQcwAoYoaHR0cDovL3JlcG9zaXRvcnkuaW5jZXJ0Lmx1L3JjYV9zZWFsLmNlcjBMBgNVHSAERTBDMEEGCSuBKwUDAQEBADA0MDIGCCsGAQUFBwIBFiZodHRwczovL3JlcG9zaXRvcnkuaW5jZXJ0Lmx1L3BvbGljaWVzLzA5BgNVHR8EMjAwMC6gLKAqhihodHRwOi8vcmVwb3NpdG9yeS5pbmNlcnQubHUvcmNhX3NlYWwuY3JsMB0GA1UdDgQWBBSSJnkPffVoLggpgOPuR8IyHqQ0tDAOBgNVHQ8BAf8EBAMCBsAwIgYKKwYBBAGDkkgBAQQUMRIEEBw+dudck0rtjq0s0GzZARIwCgYIKoZIzj0EAwMDaAAwZQIwF2j8rBbAPbYpoGpjpQ6cXAUyqOKu+yDGZ4up11PfQ07OMeq6DVwveQqOYBjEscaOAjEA58KrJAMN7ormVL08W3DT39d/1GXxIeo72N1iArrHGMdMxyihw0sGUBz0XIC90j1F</ds:X509Certificate></ds:X509Data></ds:KeyInfo></ds:Signature></Manifest>