<?xml version='1.0' encoding='utf-8'?>
<!--
  FFFD1D - Utopia medical prescription (generation 3 demo).

  A prescription written by a doctor of the Republic of Utopia and handed to the patient on
  paper or as a PDF. The pharmacist in Aurora scans the seal to check that the prescription is
  genuine, readable as written (the medication list is in clear) and still within its year of
  renewals; the patient's identity is encrypted for the pharmacies and the health insurer only.

  Ported from the BioSeal SDK test corpus (bioseal-sdk test/manifests/gen3/health/ffd020.xml);
  there is no v1 POC use case. What generation 3 shows:
  - an encrypted patient identity (bs:Encryption on a Binary field): a Patient Type encoded in
    MessagePack, encrypted with AES-256-GCM (12-byte IV at the start of the value) for two
    recipients, the pharmacies and the insurer, and bound to the seal's header (Aad HEADER;
    the SDK test case has Aad NONE) so the ciphertext cannot be moved into another seal;
  - on top of the key, the identity is shown only once the patient has entered a PIN. The SDK
    test case protects the PIN with a plain SHA256; like the Utopia health insurance card, the
    demo keys it with HMAC_SHA256 under an issuer key, so the public seal alone does not let
    anyone brute-force a short PIN offline;
  - an ObjectArray of a Medication Type mixing String, Float, Integer and a dictionary, with a
    unit on the treatment duration and instructions made mandatory for a treatment of 30 days
    or more (ext:Mandatory on an Integer condition);
  - the reason for no generic substitution asked, then required, only when substitution is
    not allowed (bs:AskWhen + ext:Mandatory on the same Boolean condition), from a dictionary;
  - the prescriber's phone number typed (bs:PhoneNumber E164) and an e-mail input hint;
  - Document Validity: a prescription is dispensed and renewed for one year from the day it
    is written. The seal has no lifetime of its own;
  - NO custom presentation view: the SDK's generic view lays the prescription out from the
    manifest (labels, groups, dictionaries, units, dates) in English and French.
  The create CLI does not encrypt: tools/check.py validates this manifest but skips the round
  trip (see README).
--><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>FFFD1D</Id>
    <Version>1</Version>
    <Name>
        <Value xml:lang="en">Medical prescription</Value>
        <Value xml:lang="fr">Ordonnance médicale</Value>
    </Name>
    <Description>
        <Value xml:lang="en">Demo: medical prescription with the medication list in clear and the patient's identity encrypted for the pharmacies and the insurer, shown once the patient enters a PIN.</Value>
        <Value xml:lang="fr">Démo : ordonnance médicale avec la liste des médicaments en clair et l'identité du patient chiffrée pour les pharmacies et l'assureur, affichée une fois le code PIN du patient saisi.</Value>
    </Description>
    <Schema>
        <Payload>
            <Fields>
                <String name="prescription_id">
                    <StringConstraints>
                        <MinLength>6</MinLength>
                        <MaxLength>14</MaxLength>
                        <Pattern>^[A-Z0-9]{6,14}$</Pattern>
                        <Encoding>C40</Encoding>
                    </StringConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Prescription number</ext:Value>
                        <ext:Value xml:lang="fr">Numéro d'ordonnance</ext:Value>
                    </Extension>
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:Placeholder xml:lang="en">RX2611240042</bs:Placeholder>
                        <bs:Placeholder xml:lang="fr">RX2611240042</bs:Placeholder>
                    </Extension>
                    <Extension xsi:type="bs:DisplayHintExtensionType">
                        <bs:Emphasis>SECONDARY</bs:Emphasis>
                    </Extension>
                </String>
                <Date name="prescribed_on">
                    <DateConstraints>
                        <NotBefore>2020-01-01</NotBefore>
                        <From>2000-01-01</From>
                    </DateConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Prescribed on</ext:Value>
                        <ext:Value xml:lang="fr">Prescrite le</ext:Value>
                    </Extension>
                    <Extension xsi:type="bs:DefaultValueExtensionType">
                        <bs:Computed>CURRENT_DATE</bs:Computed>
                    </Extension>
                    <Extension xsi:type="bs:DateFormatExtensionType">
                        <bs:Pattern>%d/%m/%Y</bs:Pattern>
                        <bs:Pattern xml:lang="en">%d %B %Y</bs:Pattern>
                    </Extension>
                </Date>
                <Object name="prescriber" type="Prescriber">
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Prescriber</ext:Value>
                        <ext:Value xml:lang="fr">Prescripteur</ext:Value>
                    </Extension>
                </Object>
                <!-- The patient's identity: a Patient object, MessagePack-encoded, then encrypted
                     with AES-256-GCM (IV in the first 12 bytes, tag at the end). Only a verifier
                     holding one of the recipients' keys reads it, and only after the patient has
                     entered their PIN. -->
                <Binary name="patient">
                    <BinaryConstraints>
                        <MaxLength>256</MaxLength>
                    </BinaryConstraints>
                    <Extension xsi:type="bs:EncryptionExtensionType">
                        <bs:Type>Patient</bs:Type>
                        <bs:Encoding>MSGPACK</bs:Encoding>
                        <bs:Algorithm>A256GCM</bs:Algorithm>
                        <bs:KeyReference>urx-patient-2026</bs:KeyReference>
                        <bs:Recipients>
                            <bs:Recipient><bs:KeyReference>aurora-pharmacies-2026</bs:KeyReference></bs:Recipient>
                            <bs:Recipient><bs:KeyReference>uhc-insurer-2026</bs:KeyReference></bs:Recipient>
                        </bs:Recipients>
                        <bs:Aad>HEADER</bs:Aad>
                        <bs:IvLayout Offset="0" Length="12"/>
                    </Extension>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Patient</ext:Value>
                        <ext:Value xml:lang="fr">Patient</ext:Value>
                    </Extension>
                    <Extension xsi:type="ext:VisibilityExtensionType">
                        <ext:Condition xsi:type="ext:ApplicationConditionType">
                            <ext:Value>VDS_OWNER_AUTHENTICATED</ext:Value>
                        </ext:Condition>
                    </Extension>
                </Binary>
                <ObjectArray name="medications" type="Medication">
                    <ArrayConstraints>
                        <MinSize>1</MinSize>
                        <MaxSize>6</MaxSize>
                    </ArrayConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Medications</ext:Value>
                        <ext:Value xml:lang="fr">Médicaments</ext:Value>
                    </Extension>
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:ItemLabel xml:lang="en">Medication</bs:ItemLabel>
                        <bs:ItemLabel xml:lang="fr">Médicament</bs:ItemLabel>
                        <bs:AddLabel xml:lang="en">Add a medication</bs:AddLabel>
                        <bs:AddLabel xml:lang="fr">Ajouter un médicament</bs:AddLabel>
                    </Extension>
                </ObjectArray>
                <Integer name="renewals">
                    <IntegerConstraints>
                        <Min>0</Min>
                        <Max>11</Max>
                    </IntegerConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Renewals</ext:Value>
                        <ext:Value xml:lang="fr">Renouvellements</ext:Value>
                    </Extension>
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:HelpText xml:lang="en">Number of times the pharmacy may dispense the treatment again, within one year.</bs:HelpText>
                        <bs:HelpText xml:lang="fr">Nombre de fois où la pharmacie peut délivrer à nouveau le traitement, dans la limite d'un an.</bs:HelpText>
                    </Extension>
                    <Extension xsi:type="bs:DefaultValueExtensionType">
                        <bs:Static>0</bs:Static>
                    </Extension>
                </Integer>
                <Boolean name="substitution_allowed">
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Generic substitution allowed</ext:Value>
                        <ext:Value xml:lang="fr">Substitution générique autorisée</ext:Value>
                    </Extension>
                    <Extension xsi:type="ext:DictionaryLookupExtensionType">
                        <ext:Dictionary>substitution</ext:Dictionary>
                    </Extension>
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:ChoiceStyle>BUTTONS</bs:ChoiceStyle>
                    </Extension>
                </Boolean>
                <String name="non_substitution_reason">
                    <StringConstraints>
                        <Nillable/>
                        <MinLength>3</MinLength>
                        <MaxLength>3</MaxLength>
                        <Pattern>^(NTI|EXC|PED)$</Pattern>
                        <Encoding>C40</Encoding>
                    </StringConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Reason for no substitution</ext:Value>
                        <ext:Value xml:lang="fr">Motif de non-substitution</ext:Value>
                    </Extension>
                    <Extension xsi:type="ext:DictionaryLookupExtensionType">
                        <ext:Dictionary>non_substitution</ext:Dictionary>
                    </Extension>
                    <!-- Asked, then required, only when substitution is not allowed. -->
                    <Extension xsi:type="ext:MandatoryExtensionType">
                        <ext:Condition xsi:type="ext:BooleanConditionType">
                            <ext:FieldName>substitution_allowed</ext:FieldName>
                            <ext:Value>false</ext:Value>
                        </ext:Condition>
                    </Extension>
                    <Extension xsi:type="bs:AskWhenExtensionType">
                        <bs:Condition xsi:type="ext:BooleanConditionType">
                            <ext:FieldName>substitution_allowed</ext:FieldName>
                            <ext:Value>false</ext:Value>
                        </bs:Condition>
                    </Extension>
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:ChoiceStyle>LIST</bs:ChoiceStyle>
                    </Extension>
                </String>
                <Binary name="pin_digest">
                    <BinaryConstraints>
                        <MinLength>32</MinLength>
                        <MaxLength>32</MaxLength>
                    </BinaryConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">PIN reference</ext:Value>
                        <ext:Value xml:lang="fr">Référence du code PIN</ext:Value>
                    </Extension>
                    <!-- Computed by the issuance platform from the PIN the patient chooses. -->
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:Entry>PLATFORM</bs:Entry>
                    </Extension>
                    <Extension xsi:type="ext:VisibilityExtensionType">
                        <ext:Condition xsi:type="ext:ApplicationConditionType">
                            <ext:Value>NEVER</ext:Value>
                        </ext:Condition>
                    </Extension>
                </Binary>
                <!-- 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>
        <Types>
            <Type name="Prescriber">
                <Fields>
                    <String name="name">
                        <StringConstraints>
                            <MaxLength>40</MaxLength>
                        </StringConstraints>
                        <Extension xsi:type="ext:LabelExtensionType">
                            <ext:Value xml:lang="en">Name</ext:Value>
                            <ext:Value xml:lang="fr">Nom</ext:Value>
                        </Extension>
                        <Extension xsi:type="bs:DisplayHintExtensionType">
                            <bs:Emphasis>PRIMARY</bs:Emphasis>
                        </Extension>
                    </String>
                    <String name="practitioner_number">
                        <StringConstraints>
                            <MinLength>11</MinLength>
                            <MaxLength>11</MaxLength>
                            <Pattern>^[0-9]{11}$</Pattern>
                            <Encoding>C40</Encoding>
                        </StringConstraints>
                        <Extension xsi:type="ext:LabelExtensionType">
                            <ext:Value xml:lang="en">Practitioner number</ext:Value>
                            <ext:Value xml:lang="fr">Numéro de praticien</ext:Value>
                        </Extension>
                        <Extension xsi:type="bs:InputHintExtensionType">
                            <bs:ErrorText xml:lang="en">11 digits.</bs:ErrorText>
                            <bs:ErrorText xml:lang="fr">11 chiffres.</bs:ErrorText>
                            <bs:InputMask>99999999999</bs:InputMask>
                        </Extension>
                    </String>
                    <String name="phone">
                        <StringConstraints>
                            <MaxLength>16</MaxLength>
                            <Pattern>^\+[1-9][0-9]{6,14}$</Pattern>
                        </StringConstraints>
                        <Extension xsi:type="ext:LabelExtensionType">
                            <ext:Value xml:lang="en">Phone</ext:Value>
                            <ext:Value xml:lang="fr">Téléphone</ext:Value>
                        </Extension>
                        <Extension xsi:type="bs:PhoneNumberExtensionType">
                            <bs:Format>E164</bs:Format>
                        </Extension>
                    </String>
                    <String name="email">
                        <StringConstraints>
                            <Nillable/>
                            <MaxLength>48</MaxLength>
                            <Pattern>^[^@ ]+@[^@ ]+\.[^@ ]+$</Pattern>
                        </StringConstraints>
                        <Extension xsi:type="ext:LabelExtensionType">
                            <ext:Value xml:lang="en">E-mail</ext:Value>
                            <ext:Value xml:lang="fr">Courriel</ext:Value>
                        </Extension>
                        <Extension xsi:type="bs:InputHintExtensionType">
                            <bs:Placeholder xml:lang="en">name@example.org</bs:Placeholder>
                            <bs:Placeholder xml:lang="fr">nom@example.org</bs:Placeholder>
                            <bs:SemanticType>EMAIL</bs:SemanticType>
                        </Extension>
                    </String>
                </Fields>
            </Type>
            <Type name="Patient">
                <Fields>
                    <String name="family_name">
                        <StringConstraints>
                            <MaxLength>40</MaxLength>
                        </StringConstraints>
                        <Extension xsi:type="ext:LabelExtensionType">
                            <ext:Value xml:lang="en">Surname</ext:Value>
                            <ext:Value xml:lang="fr">Nom</ext:Value>
                        </Extension>
                    </String>
                    <String name="given_names">
                        <StringConstraints>
                            <MaxLength>60</MaxLength>
                        </StringConstraints>
                        <Extension xsi:type="ext:LabelExtensionType">
                            <ext:Value xml:lang="en">Given names</ext:Value>
                            <ext:Value xml:lang="fr">Prénoms</ext:Value>
                        </Extension>
                    </String>
                    <Date name="date_of_birth">
                        <DateConstraints>
                            <NotBefore>1900-01-01</NotBefore>
                            <From>1900-01-01</From>
                        </DateConstraints>
                        <Extension xsi:type="ext:LabelExtensionType">
                            <ext:Value xml:lang="en">Date of birth</ext:Value>
                            <ext:Value xml:lang="fr">Date de naissance</ext:Value>
                        </Extension>
                        <Extension xsi:type="bs:DateFormatExtensionType">
                            <bs:Pattern>%d/%m/%Y</bs:Pattern>
                            <bs:Pattern xml:lang="en">%d %b %Y</bs:Pattern>
                        </Extension>
                    </Date>
                    <String name="insurance_number">
                        <StringConstraints>
                            <MinLength>13</MinLength>
                            <MaxLength>13</MaxLength>
                            <Pattern>^[0-9]{13}$</Pattern>
                        </StringConstraints>
                        <Extension xsi:type="ext:LabelExtensionType">
                            <ext:Value xml:lang="en">Insurance number</ext:Value>
                            <ext:Value xml:lang="fr">Numéro d'assuré</ext:Value>
                        </Extension>
                    </String>
                </Fields>
            </Type>
            <Type name="Medication">
                <Fields>
                    <String name="product">
                        <StringConstraints>
                            <MaxLength>40</MaxLength>
                        </StringConstraints>
                        <Extension xsi:type="ext:LabelExtensionType">
                            <ext:Value xml:lang="en">Product</ext:Value>
                            <ext:Value xml:lang="fr">Produit</ext:Value>
                        </Extension>
                        <Extension xsi:type="bs:DisplayHintExtensionType">
                            <bs:Emphasis>PRIMARY</bs:Emphasis>
                        </Extension>
                    </String>
                    <Float name="dose">
                        <FloatConstraints>
                            <Min>0.01</Min>
                            <Max>5000</Max>
                        </FloatConstraints>
                        <Extension xsi:type="ext:LabelExtensionType">
                            <ext:Value xml:lang="en">Dose</ext:Value>
                            <ext:Value xml:lang="fr">Dose</ext:Value>
                        </Extension>
                    </Float>
                    <String name="unit">
                        <StringConstraints>
                            <MinLength>2</MinLength>
                            <MaxLength>3</MaxLength>
                            <Pattern>^(MG|ML|TAB|IU)$</Pattern>
                        </StringConstraints>
                        <Extension xsi:type="ext:LabelExtensionType">
                            <ext:Value xml:lang="en">Dose unit</ext:Value>
                            <ext:Value xml:lang="fr">Unité de dose</ext:Value>
                        </Extension>
                        <Extension xsi:type="ext:DictionaryLookupExtensionType">
                            <ext:Dictionary>dose_unit</ext:Dictionary>
                        </Extension>
                        <Extension xsi:type="bs:InputHintExtensionType">
                            <bs:ChoiceStyle>BUTTONS</bs:ChoiceStyle>
                        </Extension>
                    </String>
                    <Integer name="per_day">
                        <IntegerConstraints>
                            <Min>1</Min>
                            <Max>12</Max>
                        </IntegerConstraints>
                        <Extension xsi:type="ext:LabelExtensionType">
                            <ext:Value xml:lang="en">Times per day</ext:Value>
                            <ext:Value xml:lang="fr">Prises par jour</ext:Value>
                        </Extension>
                    </Integer>
                    <Integer name="days">
                        <IntegerConstraints>
                            <Min>1</Min>
                            <Max>365</Max>
                        </IntegerConstraints>
                        <Extension xsi:type="ext:LabelExtensionType">
                            <ext:Value xml:lang="en">Duration</ext:Value>
                            <ext:Value xml:lang="fr">Durée</ext:Value>
                        </Extension>
                        <Extension xsi:type="bs:DisplayHintExtensionType">
                            <bs:Unit xml:lang="en">days</bs:Unit>
                            <bs:Unit xml:lang="fr">jours</bs:Unit>
                        </Extension>
                    </Integer>
                    <String name="instructions">
                        <StringConstraints>
                            <Nillable/>
                            <MaxLength>80</MaxLength>
                        </StringConstraints>
                        <Extension xsi:type="ext:LabelExtensionType">
                            <ext:Value xml:lang="en">Instructions</ext:Value>
                            <ext:Value xml:lang="fr">Instructions</ext:Value>
                        </Extension>
                        <Extension xsi:type="bs:InputHintExtensionType">
                            <bs:HelpText xml:lang="en">Free text, printed as written. Required for a treatment of 30 days or more.</bs:HelpText>
                            <bs:HelpText xml:lang="fr">Texte libre, imprimé tel quel. Obligatoire pour un traitement de 30 jours ou plus.</bs:HelpText>
                            <bs:SemanticType>MULTILINE</bs:SemanticType>
                        </Extension>
                        <!-- Instructions are required for a long treatment. -->
                        <Extension xsi:type="ext:MandatoryExtensionType">
                            <ext:Condition xsi:type="ext:IntegerConditionType">
                                <ext:FieldName>days</ext:FieldName>
                                <ext:Min>30</ext:Min>
                            </ext:Condition>
                        </Extension>
                    </String>
                </Fields>
            </Type>
        </Types>
    </Schema>
    <Extensions>
        <Extension xsi:type="ext:DictionariesExtensionType">
            <ext:Dictionary name="dose_unit">
                <ext:Entry key="MG"><ext:Value xml:lang="en">mg</ext:Value><ext:Value xml:lang="fr">mg</ext:Value></ext:Entry>
                <ext:Entry key="ML"><ext:Value xml:lang="en">ml</ext:Value><ext:Value xml:lang="fr">ml</ext:Value></ext:Entry>
                <ext:Entry key="TAB"><ext:Value xml:lang="en">tablet(s)</ext:Value><ext:Value xml:lang="fr">comprimé(s)</ext:Value></ext:Entry>
                <ext:Entry key="IU"><ext:Value xml:lang="en">IU</ext:Value><ext:Value xml:lang="fr">UI</ext:Value></ext:Entry>
            </ext:Dictionary>
            <ext:Dictionary name="substitution">
                <ext:Entry key="true"><ext:Value xml:lang="en">Yes</ext:Value><ext:Value xml:lang="fr">Oui</ext:Value></ext:Entry>
                <ext:Entry key="false"><ext:Value xml:lang="en">No: dispense as written</ext:Value><ext:Value xml:lang="fr">Non : délivrer tel que prescrit</ext:Value></ext:Entry>
            </ext:Dictionary>
            <ext:Dictionary name="non_substitution">
                <ext:Entry key="NTI"><ext:Value xml:lang="en">Narrow therapeutic index</ext:Value><ext:Value xml:lang="fr">Marge thérapeutique étroite</ext:Value></ext:Entry>
                <ext:Entry key="EXC"><ext:Value xml:lang="en">Documented intolerance to an excipient</ext:Value><ext:Value xml:lang="fr">Intolérance documentée à un excipient</ext:Value></ext:Entry>
                <ext:Entry key="PED"><ext:Value xml:lang="en">Child: no suitable generic form</ext:Value><ext:Value xml:lang="fr">Enfant : pas de forme générique adaptée</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: the year a prescription is dispensed and renewed is the
                 document's validity (bs:DocumentValidity below), not the seal's. -->
            <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:DocumentValidityExtensionType">
            <bs:NotBefore><bs:PayloadField>prescribed_on</bs:PayloadField></bs:NotBefore>
            <bs:Duration>
                <bs:Value>1</bs:Value>
                <bs:Unit>YEARS</bs:Unit>
            </bs:Duration>
        </Extension>
        <Extension xsi:type="bs:AdditionalInformationExtensionType">
            <bs:DataPrivacy>
                <bs:Value xml:lang="en">The prescriber and the medications are readable by anyone who scans the prescription. The patient's identity is encrypted: only the pharmacies and the insurer can decrypt it, and only once the patient has entered their PIN.</bs:Value>
                <bs:Value xml:lang="fr">Le prescripteur et les médicaments sont lisibles par quiconque scanne l'ordonnance. L'identité du patient est chiffrée : seuls les pharmacies et l'assureur peuvent la déchiffrer, et seulement après la saisie du code PIN du patient.</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>BASE45</bs:Encoding>
            <bs:QuietZone>4</bs:QuietZone>
            <bs:Symbology>QRCODE</bs:Symbology>
            <bs:QrcodeParameters>
                <bs:ErrorCorrectionLevel>Q</bs:ErrorCorrectionLevel>
                <bs:Version>AUTOMATIC</bs:Version>
            </bs:QrcodeParameters>
            <bs:Caption>
                <bs:Text>UTOPIA · Rx</bs:Text>
                <bs:Position>BOTTOM</bs:Position>
                <bs:Color>#FFFFFF</bs:Color>
                <bs:FontFamily>SANS_SERIF</bs:FontFamily>
                <bs:Style>FRAME</bs:Style>
                <bs:FrameColor>#1E6B3A</bs:FrameColor>
                <bs:CornerRadius>8</bs:CornerRadius>
                <bs:FontWeight>700</bs:FontWeight>
            </bs:Caption>
        </Extension>
        <Extension xsi:type="bs:FieldGroupsExtensionType">
            <bs:Group Name="prescription" Scope="BOTH">
                <bs:Label xml:lang="en">Prescription</bs:Label>
                <bs:Label xml:lang="fr">Ordonnance</bs:Label>
                <bs:PayloadField>prescription_id</bs:PayloadField>
                <bs:PayloadField>prescribed_on</bs:PayloadField>
                <bs:PayloadField>prescriber</bs:PayloadField>
            </bs:Group>
            <bs:Group Name="patient" Scope="BOTH" Collapsible="true">
                <bs:Label xml:lang="en">Patient</bs:Label>
                <bs:Label xml:lang="fr">Patient</bs:Label>
                <bs:Description xml:lang="en">Encrypted for the pharmacies and the insurer; unlocked by the patient's PIN.</bs:Description>
                <bs:Description xml:lang="fr">Chiffré pour les pharmacies et l'assureur ; déverrouillé par le code PIN du patient.</bs:Description>
                <bs:PayloadField>patient</bs:PayloadField>
            </bs:Group>
            <bs:Group Name="treatment" Scope="BOTH">
                <bs:Label xml:lang="en">Treatment</bs:Label>
                <bs:Label xml:lang="fr">Traitement</bs:Label>
                <bs:PayloadField>medications</bs:PayloadField>
                <bs:PayloadField>renewals</bs:PayloadField>
                <bs:PayloadField>substitution_allowed</bs:PayloadField>
                <bs:PayloadField>non_substitution_reason</bs:PayloadField>
            </bs:Group>
            <bs:Group Name="security" Scope="FORM" Collapsible="true" Collapsed="true">
                <bs:Label xml:lang="en">Patient's PIN</bs:Label>
                <bs:Label xml:lang="fr">Code PIN du patient</bs:Label>
                <bs:Description xml:lang="en">Computed by the platform from the PIN the patient chooses; never shown.</bs:Description>
                <bs:Description xml:lang="fr">Calculée par la plateforme à partir du code PIN choisi par le patient ; jamais affichée.</bs:Description>
                <bs:PayloadField>pin_digest</bs:PayloadField>
            </bs:Group>
        </Extension>
        <!-- PIN reference: HMAC-SHA-256 of "FFFD1D:<PIN>" under the issuer key urx-pin-2026, which
             verifiers obtain from the issuer (the owner key callback of the SDK). -->
        <Extension xsi:type="bs:OwnerAuthenticationExtensionType">
            <bs:Method xsi:type="bs:PinAuthMethodType">
                <bs:PayloadField>pin_digest</bs:PayloadField>
                <bs:MinLength>4</bs:MinLength>
                <bs:MaxLength>8</bs:MaxLength>
                <bs:Protection>
                    <bs:Algorithm>HMAC_SHA256</bs:Algorithm>
                    <bs:Salt>MANIFEST_ID</bs:Salt>
                    <bs:KeyReference>urx-pin-2026</bs:KeyReference>
                </bs:Protection>
            </bs:Method>
            <bs:GrantsConsent>true</bs:GrantsConsent>
            <bs:RequiredMethods>1</bs:RequiredMethods>
        </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>5a/tg/bnAHCiRhx2zzl3M5qAFkYieAcsMBQyNWimwOE=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>7gw4LexPapmYovIgzBIuBZ6qJ4jXTXzkp6Xy35b330KFsqrW+ZcUMyqt3f7yEKa/AHPLEkwgIRKYYWcdo8lITQ==</ds:SignatureValue><ds:KeyInfo><ds:X509Data><ds:X509Certificate>MIIDODCCAr6gAwIBAgIIHIOg/q3eBccwCgYIKoZIzj0EAwMwPTEdMBsGA1UEAwwUVmlzaWJsZSBTZWFsIFJvb3QgQ0ExDzANBgNVBAoMBklOQ0VSVDELMAkGA1UEBhMCTFUwHhcNMjYwMjA5MTY1NjQ5WhcNMjkwMjA4MTY1NjQ4WjCBjTEYMBYGCgmSJomT8ixkAQEMCENCODBBQjhGMSwwKgYDVQQDDCNpZDMgVGVjaG5vbG9naWVzIC0gT3RlbnRpayBNYW5pZmVzdDEaMBgGA1UECwwRSUQgMyBURUNITk9MT0dJRVMxGjAYBgNVBAoMEUlEIDMgVEVDSE5PTE9HSUVTMQswCQYDVQQGEwJGUjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCYIqSmOgyvlbmslWH0HQypYlKsrvdkuuayp5ZJZ6nOs5DK+6C1z8yR931KeTopU8MVV6XBBAYAbNA6Kv60yRTijggFVMIIBUTAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFCGhTeB27aTBB5FSMvHxKdsfjOdIMEQGCCsGAQUFBwEBBDgwNjA0BggrBgEFBQcwAoYoaHR0cDovL3JlcG9zaXRvcnkuaW5jZXJ0Lmx1L3JjYV9zZWFsLmNlcjBMBgNVHSAERTBDMEEGCSuBKwUDAQEBADA0MDIGCCsGAQUFBwIBFiZodHRwczovL3JlcG9zaXRvcnkuaW5jZXJ0Lmx1L3BvbGljaWVzLzA5BgNVHR8EMjAwMC6gLKAqhihodHRwOi8vcmVwb3NpdG9yeS5pbmNlcnQubHUvcmNhX3NlYWwuY3JsMB0GA1UdDgQWBBSSJnkPffVoLggpgOPuR8IyHqQ0tDAOBgNVHQ8BAf8EBAMCBsAwIgYKKwYBBAGDkkgBAQQUMRIEEBw+dudck0rtjq0s0GzZARIwCgYIKoZIzj0EAwMDaAAwZQIwF2j8rBbAPbYpoGpjpQ6cXAUyqOKu+yDGZ4up11PfQ07OMeq6DVwveQqOYBjEscaOAjEA58KrJAMN7ormVL08W3DT39d/1GXxIeo72N1iArrHGMdMxyihw0sGUBz0XIC90j1F</ds:X509Certificate></ds:X509Data></ds:KeyInfo></ds:Signature></Manifest>