For the attached XML, I want to use the regex expression [A-Z][A-Z]\d{5}|[A-Z]\d{6} to match the string SZ9421.
This string can be inside any node in OBR.5. Is there any easy way to extract it extract it to a xml or html or pdf view?
<OBX.5>
Swee T Tan<escape V=".br"/>Client<escape V=".br"/>Number<escape V=".br"/>SZ9421<escape V=".br"/>Full Name:<escape V=".br"/>XX, Robert (Mr)<escape V=".br"/>Address:<escape V=".br"/>XX XX Street<escape V=".br"/>XXX<escape V=".br"/>LOWER HUTT 5011<escape V=".br"/>Date of Birth:<escape V=".br"/>15.03.1987<escape V=".br"/>Telephone:<escape V=".br"/>(h) 938 2684<escape V=".br"/>(m) 027 632 4590<escape V=".br"/>NHI Number:<escape V=".br"/>JAP5065<escape V=".br"/>Date of Injury:<escape V=".br"/>16.09.2011<escape V=".br"/>Referring Provider:<escape V=".br"/>Dr Erich Kusel<escape V=".br"/>
<escape V=".br"/>History, Examination and Diagnosis<escape V=".br"/>Type of Assessment<escape V=".br"/>CS100 - Simple<escape V=".br"/>History of the current condition:<escape V=".br"/>This patient sustained a laceration on the radial aspect of the proximal phalanx of the left middle finger about 3 weeks agop while cooking. He lost sensation distal to this on the radial side of the middle finger immediately. There has been no recovery of this since then.<escape V=".br"/>Causal Medical Link Between Proposed Treatment & Covered Injury:<escape V=".br"/>Yes, as described herein.<escape V=".br"/>Relevant Pre-existing Factors:<escape V=".br"/>Nil.<escape V=".br"/>Clinical Examination:<escape V=".br"/>Clinical examination shows a healed scar on he radial side of the left middle finger. There is complete loss of sensation on the radial border of that finger distal to the scar. He has a full range of motion in that finger.<escape V=".br"/>Diagnostic Tests & Imaging:<escape V=".br"/>Nil.<escape V=".br"/>Specific Diagnosis:<escape V=".br"/>Transection of radial digital nerve left middle finger.<escape V=".br"/>
<escape V=".br"/>
</OBX.5>
XSD is
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://ift.tt/tphNwY">
<xs:element name="OBX.5">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element ref="escape" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="escape">
<xs:complexType>
<xs:attribute name="V" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>
No comments:
Post a Comment