<?xml version="1.0" encoding="UTF-8"?>
<ADT_A17 xmlns="urn:hl7-org:v2xml">MICASA
    <MSH>
        <MSH.1 LongName="Field Separator">|</MSH.1>
        <MSH.2 LongName="Encoding Characters">^~\&amp;</MSH.2>
        <MSH.3 LongName="Sending Application">
            <HD.1>HIS</HD.1>
        </MSH.3>
        <MSH.4 LongName="Sending Facility">
            <HD.1>050101</HD.1>
        </MSH.4>
        <MSH.5 LongName="Receiving Application">
            <HD.1>CUIDADOS</HD.1>
        </MSH.5>
        <MSH.6 LongName="Receiving Facility">
            <HD.1>050101</HD.1>
        </MSH.6>
        <MSH.7 LongName="Date/Time Of Message"><TS.1>20080427092114</TS.1></MSH.7>
        <MSH.9  LongName="Message Type">
            <MSG.1>ADT</MSG.1>
            <MSG.2>A17</MSG.2>
            <MSG.3>ADT_A17</MSG.3>
        </MSH.9>
        <MSH.10  LongName="Message Control ID">MENSAJE_EJEMPLO_ADT_A17_1</MSH.10>
        <MSH.11  LongName="Processing ID"><PT.1>P</PT.1></MSH.11>
        <MSH.12 LongName="Version ID"><VID.1>2.5</VID.1></MSH.12>
        <MSH.15 LongName="Accept Acknowledgment Type">AL</MSH.15>
        <MSH.16 LongName="Application Acknowledgment Type">ER</MSH.16>
        
    </MSH>
    <EVN>
        <EVN.2 LongName="Recorded Date/Time"><TS.1>20080427092100</TS.1></EVN.2>
        <EVN.6 LongName="Event Occurred"><TS.1>20080427092100</TS.1></EVN.6>
    </EVN>
    <PID>
        <PID.1 LongName="Set ID - PID">1</PID.1>
        <PID.3 LongName="Patient Identifier List">
            <CX.1>12345679</CX.1>
            <CX.4><HD.1>MI</HD.1></CX.4>
            <CX.5>NNESP</CX.5>
            <CX.9>
                <CWE.1>ESP</CWE.1>
                <CWE.3>ISO3166</CWE.3>
            </CX.9>
        </PID.3>

        <PID.3 LongName="Patient Identifier List">
            <CX.1>AST12345679</CX.1>
            <CX.4><HD.1>MS</HD.1></CX.4>
            <CX.5>HC</CX.5>
            <CX.9>
                <CWE.1>ESP</CWE.1>
                <CWE.3>ISO3166</CWE.3>
            </CX.9>
        </PID.3>
        <PID.3 LongName="Patient Identifier List">
            <CX.1>100000</CX.1>
            <CX.4><HD.1>HIS</HD.1></CX.4>
            <CX.5>PI</CX.5>
            <CX.9>
                <CWE.1>050101</CWE.1>
                <CWE.3>99CENTROMICASA</CWE.3>
            </CX.9>
        </PID.3>
        <PID.5 LongName="Patient Name">
            <XPN.1>
                <FN.1 LongName="Surname">SaEZ</FN.1>
            </XPN.1>
            <XPN.2 LongName="Given Name">ALBERTO</XPN.2>
        </PID.5>
        <PID.6 LongName="Mother's Maiden Name">
            <XPN.1>
                <FN.1>TORRES</FN.1>
            </XPN.1>
        </PID.6>
        <PID.7 LongName="Date/Time of Birth">
            <TS.1>19750322</TS.1>
        </PID.7>
        <PID.8 LongName="Administrative Sex">M</PID.8>
        <PID.11 LongName="Patient Address">
            <XAD.1 LongName="Street Address">
                <SAD.1>C</SAD.1>
                <SAD.2 >NiNa Bonita</SAD.2>
                <SAD.3 >78</SAD.3>
            </XAD.1>
            <XAD.2 LongName="Other Designation" >5</XAD.2>
            <XAD.3 LongName="City">051159</XAD.3> <!-- Municipio -->
            <XAD.4 LongName="State or Province">5</XAD.4> <!-- Provincia -->
            <XAD.5 LongName="Zip or Postal Code">5291</XAD.5> <!-- CP -->
            <XAD.6 LongName="Country">ESP</XAD.6> <!-- Pais -->
            <XAD.7 LongName="Address Type">H</XAD.7>
            <XAD.8 LongName="Other Geographic Designation">Maello</XAD.8> <!-- Poblacion (en este caso coincide con XAD.3) -->
        </PID.11>
 
        <PID.13 LongName="Phone Number - Home">
            <XTN.2 LongName="Telecommunication Use Code">PRN</XTN.2>
            <XTN.3 LongName="Telecommunication Equipment Type">PH</XTN.3>
            <XTN.7 LongName="Local Number">921787865</XTN.7>
        </PID.13>
        <PID.26 LongName="Citizenship">
            <CE.1>ESP</CE.1>
            <CE.2>EspaNa</CE.2>
            <CE.3>ISO3166</CE.3>
        </PID.26>
        
    </PID>
    <PV1>
        <PV1.1 LongName="Set ID - PV1">1</PV1.1>
        <PV1.2 LongName="Patient Class">I</PV1.2>
        <PV1.3 LongName="Assigned Patient Location">
            <PL.1 LongName="Point of Care" >UE6D</PL.1>
            <PL.2 LongName="Room">117-</PL.2>
            <PL.3 LongName="Bed">117-1</PL.3>
            <PL.4 LongName="Facility">
                <HD.1>050101</HD.1>
            </PL.4>
        </PV1.3>
        <PV1.19 LongName="Visit Number">
            <CX.1>11111111111111</CX.1>
            <CX.4><HD.1>HOS</HD.1></CX.4>
            <CX.5>VN</CX.5>
            <CX.9>
                <CWE.1>050101</CWE.1>
                <CWE.3>99CENTROMICASA</CWE.3>
            </CX.9>
        </PV1.19>
    </PV1>
    <PID>
        <PID.1 LongName="Set ID - PID">2</PID.1>
        <!-- DNI del paciente -->
        <PID.3 LongName="Patient Identifier List">
            <CX.1>2222222l</CX.1>
            <CX.4><HD.1>MI</HD.1></CX.4>
            <CX.5>NNESP</CX.5>
            <CX.9>
                <CWE.1>ESP</CWE.1>
                <CWE.3>ISO3166</CWE.3>
            </CX.9>
        </PID.3>
        <!-- Tarjeta Sanitaria (CIP del paciente) -->
        <PID.3 LongName="Patient Identifier List">
            <CX.1>AST2222222</CX.1>
            <CX.4><HD.1>MS</HD.1></CX.4>
            <CX.5>HC</CX.5>
            <CX.9>
                <CWE.1>ESP</CWE.1>
                <CWE.3>ISO3166</CWE.3>
            </CX.9>
        </PID.3>
        <!-- Numero de Historia Clinica del Hospital de avila -->
        <PID.3 LongName="Patient Identifier List">
            <CX.1>200000</CX.1>
            <CX.4><HD.1>HIS</HD.1></CX.4>
            <CX.5>PI</CX.5>
            <CX.9>
                <CWE.1>050101</CWE.1>
                <CWE.3>99CENTROMICASA</CWE.3>
            </CX.9>
        </PID.3>
        <PID.5 LongName="Patient Name">
            <XPN.1>
                <FN.1 LongName="Surname">SWAP2</FN.1>
            </XPN.1>
            <XPN.2 LongName="Given Name">SWAP1</XPN.2>
        </PID.5>
        <PID.6 LongName="Mother's Maiden Name">
            <XPN.1>
                <FN.1>SWAP3</FN.1>
            </XPN.1>
        </PID.6>
        <PID.7 LongName="Date/Time of Birth">
            <TS.1>19750322</TS.1>
        </PID.7>
        <PID.8 LongName="Administrative Sex">M</PID.8>
        <PID.11 LongName="Patient Address">
            <XAD.1 LongName="Street Address">
                <SAD.1>C</SAD.1>
                <SAD.2 >NiNa Bonita</SAD.2>
                <SAD.3 >78</SAD.3>
            </XAD.1>
            <XAD.2 LongName="Other Designation" >4º Izquierda</XAD.2>
            <XAD.3 LongName="City">051159</XAD.3> <!-- Municipio -->
            <XAD.4 LongName="State or Province">5</XAD.4> <!-- Provincia -->
            <XAD.5 LongName="Zip or Postal Code">5291</XAD.5> <!-- CP -->
            <XAD.6 LongName="Country">ESP</XAD.6> <!-- Pais -->
            <XAD.7 LongName="Address Type">H</XAD.7>
            <XAD.8 LongName="Other Geographic Designation">Maello</XAD.8> <!-- Poblacion (en este caso coincide con XAD.3) -->
        </PID.11>
        <!-- Telefono -->
        <PID.13 LongName="Phone Number - Home">
            <XTN.2 LongName="Telecommunication Use Code">PRN</XTN.2>
            <XTN.3 LongName="Telecommunication Equipment Type">PH</XTN.3>
            <XTN.7 LongName="Local Number">921787865</XTN.7>
        </PID.13>
        <PID.26 LongName="Citizenship">
            <CE.1>ESP</CE.1>
            <CE.2>EspaNa</CE.2>
            <CE.3>ISO3166</CE.3>
        </PID.26>
        
    </PID>
    <PV1>
        <PV1.1 LongName="Set ID - PV1">2</PV1.1>
        <PV1.2 LongName="Patient Class">I</PV1.2>
        <PV1.3 LongName="Assigned Patient Location">
            <PL.1 LongName="Point of Care" >UE6D</PL.1>
            <PL.2 LongName="Room">217-</PL.2>
            <PL.3 LongName="Bed">217-2</PL.3>
            <PL.4 LongName="Facility">
                <HD.1>050101</HD.1>
            </PL.4>
        </PV1.3>
        <PV1.19 LongName="Visit Number">
            <CX.1>2222222222222222</CX.1>
            <CX.4><HD.1>HOS</HD.1></CX.4>
            <CX.5>VN</CX.5>
            <CX.9>
                <CWE.1>050101</CWE.1>
                <CWE.3>99CENTROMICASA</CWE.3>
            </CX.9>
        </PV1.19>
    </PV1>
    
</ADT_A17>

