[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: some HAVE 2.0 (wd08) data in the wild
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns="http://earth.google.com/kml/2.2" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:have="urn:oasis:names:tc:emergency:edxl:have:2.0" xmlns:edxl-ct="urn:oasis:names:tc:emergency:edxl:ct:1.0" xmlns:edxl-gsf="urn:oasis:names:tc:emergency:edxl:gsf:1.0" xmlns:gml="http://www.opengis.net/gml/3.2" exclude-result-prefixes="have edxl-ct edxl-gsf gml" version="1.0"> <!-- --> <xsl:output method="xml" /> <xsl:template match="/"> <kml xmlns="http://earth.google.com/kml/2.2"> <Document> <name>CAUSE2-NB-Hospitals</name> <description><![CDATA[]]></description> <Style id="hospital"> <IconStyle> <Icon> <href>https://causeresilience2.s3.amazonaws.com/img/ems.operations.emergencyMedical.hospital.png</href> </Icon> </IconStyle> </Style> <Style id="hospital.red"> <IconStyle> <Icon> <href>https://causeresilience2.s3.amazonaws.com/img/ems.operations.emergencyMedical.hospital.red.png</href> </Icon> </IconStyle> </Style> <Style id="hospital.green"> <IconStyle> <Icon> <href>https://causeresilience2.s3.amazonaws.com/img/ems.operations.emergencyMedical.hospital.green.png</href> </Icon> </IconStyle> </Style> <Style id="hospital.yellow"> <IconStyle> <Icon> <href>https://causeresilience2.s3.amazonaws.com/img/ems.operations.emergencyMedical.hospital.yellow.png</href> </Icon> </IconStyle> </Style> <xsl:for-each select="have:HAVE/have:facility"> <xsl:call-template name="FacilityBlock"/> <!-- <h2><xsl:value-of select="have:facilityInformation/have:facilityName"/></h2> --> </xsl:for-each> </Document> </kml> </xsl:template> <xsl:template name="FacilityBlock"> <Placemark> <name> <xsl:value-of select="have:facilityInformation/have:facilityName"/> </name> <description> <xsl:text disable-output-escaping="yes"><![CDATA[</xsl:text> <!-- Facility Level Details --> <xsl:call-template name="ColourCodeFacility"></xsl:call-template> <xsl:value-of select="have:facilityInformation/have:facilityName"/> <br /> <!-- ServiceList --> <xsl:for-each select="have:serviceList/have:serviceListItem"> <xsl:call-template name="ServiceListItemBlock"/> <br /> </xsl:for-each> <xsl:text disable-output-escaping="yes">]]></xsl:text> </description> <styleUrl><xsl:call-template name="ColourCodeFacilityStyle"></xsl:call-template></styleUrl> <Point> <xsl:variable name="gmlCoordString"> <xsl:value-of select="have:facilityInformation/have:facilityGeoLocation/edxl-ct:EDXLGeoLocation/gml:Point/gml:pos"/> </xsl:variable> <!-- DEBUG <temp><xsl:value-of select="$gmlCoordString"/></temp> --> <coordinates><xsl:value-of select="substring-after($gmlCoordString, ' ')" /> <xsl:text>,</xsl:text><xsl:value-of select="substring-before($gmlCoordString, ' ')" /><xsl:text>,</xsl:text></coordinates> </Point> </Placemark> </xsl:template> <xsl:template name="ColourCodeFacility"> <!-- TODO - create colour-code images and then use to generate diff filenames Take COLOUR CODE and get image name --> <xsl:variable name="serviceColour"> <xsl:value-of select="have:facilityColourStatus/have:colourCode/edxl-ct:Value"/> </xsl:variable> <!-- DEBUG <xsl:value-of select="$serviceColour"/> --> <xsl:choose> <xsl:when test="$serviceColour != ''"> <!-- ems.operations.emergencyMedical.hospital.COLOR.png COLOR is actually lowercase--> <img height="16" width="16" src="https://causeresilience2.s3.amazonaws.com/img/ems.operations.emergencyMedical.hospital.{$serviceColour}.png"/> </xsl:when> <xsl:otherwise> <img height="16" width="16" src="https://causeresilience2.s3.amazonaws.com/img/ems.operations.emergencyMedical.hospital.png"/> </xsl:otherwise> </xsl:choose> <!-- <img height="16" width="16" src="./img/ems.operations.emergencyMedical.hospital.png"/> --> </xsl:template> <xsl:template name="ColourCodeFacilityStyle"> <!-- TODO - create colour-code images and then use to generate diff filenames Take COLOUR CODE and get image name --> <xsl:variable name="serviceColour"> <xsl:value-of select="have:facilityColourStatus/have:colourCode/edxl-ct:Value"/> </xsl:variable> <!-- DEBUG <xsl:value-of select="$serviceColour"/> --> <xsl:choose> <xsl:when test="$serviceColour != ''"> <!-- ems.operations.emergencyMedical.hospital.COLOR.png COLOR is actually lowercase--> <xsl:text>#hospital.</xsl:text><xsl:value-of select="$serviceColour"/> </xsl:when> <xsl:otherwise> <xsl:text>#hospital</xsl:text> </xsl:otherwise> </xsl:choose> <!-- <img height="16" width="16" src="./img/ems.operations.emergencyMedical.hospital.png"/> --> </xsl:template> <xsl:template name="ServiceListItemBlock"> <xsl:variable name="serviceColour"> <xsl:value-of select="have:serviceStatus/have:colourStatus/have:colourCodeDefault/edxl-ct:Value"/> </xsl:variable> <!-- <xsl:value-of select="have:serviceStatus/have:colourStatus/have:colourCodeDefault/edxl-ct:Value" /> </xsl:variable> --> <xsl:choose> <xsl:when test="$serviceColour != ''"> <!-- ems.operations.emergencyMedical.hospital.COLOR.png COLOR is actually lowercase--> <img height="16" width="16" src="https://causeresilience2.s3.amazonaws.com/img/{$serviceColour}.png"/> </xsl:when> <xsl:otherwise><!-- GREEN by default --> <img height="16" width="16" src="https://causeresilience2.s3.amazonaws.com/img/green.png"/> </xsl:otherwise> </xsl:choose> <xsl:value-of select="have:serviceName" /> <!-- <xsl:text> - [</xsl:text><xsl:value-of select="translate(have:serviceStatus/have:colourStatus/have:colourCodeDefault/edxl-ct:Value, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/> <xsl:text>]</xsl:text> --> </xsl:template> <xsl:template name="GeoLocationBlock"> <br/>COORDS: <xsl:value-of select="have:facilityInformation/have:facilityGeoLocation/edxl-ct:EDXLGeoLocation/gml:Point/gml:pos" /> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?> <have:HAVE xmlns:edxl-gsf="urn:oasis:names:tc:emergency:edxl:gsf:1.0" xmlns:have="urn:oasis:names:tc:emergency:edxl:have:2.0" xmlns:xpil="urn:oasis:names:tc:emergency:edxl:ciq:1.0:xpil" xmlns:xal="urn:oasis:names:tc:emergency:edxl:ciq:1.0:xal" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:n="urn:oasis:names:tc:emergency:edxl:ciq:1.0:xnl" xmlns:edxl-ct="urn:oasis:names:tc:emergency:edxl:ct:1.0" xmlns:ciqct="urn:oasis:names:tc:emergency:edxl:ciq:1.0:ct" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:emergency:edxl:have:2.0 file:edxl-have-v2.0-wd08.xsd"> <have:organizationInformation> <n:OrganisationName> </n:OrganisationName> </have:organizationInformation> <have:facility> <have:facilityInformation> <have:facilityID>NB-SaintJohnRegional</have:facilityID> <have:facilityName>Saint John Regional</have:facilityName> <have:facilityGeoLocation> <edxl-ct:EDXLGeoLocation> <gml:Point gml:id="NBSaintJohnRegional"> <gml:pos>45.301785 -66.084793</gml:pos> </gml:Point> </edxl-ct:EDXLGeoLocation> </have:facilityGeoLocation> <have:facilityDetails> <n:OrganisationName> </n:OrganisationName> <xpil:Addresses> <xpil:Address> <xal:Country> <xal:NameElement>CANADA</xal:NameElement> </xal:Country> <xal:AdministrativeArea> <xal:NameElement>New Brunswick</xal:NameElement> </xal:AdministrativeArea> <xal:Locality> <xal:NameElement>Saint John</xal:NameElement> </xal:Locality> </xpil:Address> </xpil:Addresses> </have:facilityDetails> <have:clinicalStatusDefault>Normal</have:clinicalStatusDefault> <have:emergencyDepartmentStatus><have:emsCapacity><have:triageCode> <have:triageCodeValue>Red</have:triageCodeValue> <have:triageCountQuantity>2</have:triageCountQuantity> </have:triageCode></have:emsCapacity></have:emergencyDepartmentStatus> </have:facilityInformation> <have:serviceList> <have:taxonomyURI> </have:taxonomyURI> <have:taxonomyName> </have:taxonomyName> <have:serviceListItem> <have:serviceTaxonomyKeyValue>trauma.level1.adult</have:serviceTaxonomyKeyValue> <have:serviceName>Trauma Level 1 - Adult</have:serviceName> <have:serviceStatus> <have:isAvailable>true</have:isAvailable> <have:colourStatus> <have:colourCodeDefault> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>green</edxl-ct:Value> </have:colourCodeDefault> </have:colourStatus> <have:comment>Trauma levels are normal</have:comment> <have:stability>stable</have:stability> </have:serviceStatus> <have:serviceBedCapacity> <have:availableCount>6</have:availableCount> <have:baselineCount>8</have:baselineCount> <have:capacityNote/> </have:serviceBedCapacity> </have:serviceListItem> <have:serviceListItem> <have:serviceTaxonomyKeyValue>trauma.level1.pediatric</have:serviceTaxonomyKeyValue> <have:serviceName>Trauma Level 1 - Pediatric</have:serviceName> </have:serviceListItem> </have:serviceList> <have:facilityColourStatus> <have:colourCode> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>green</edxl-ct:Value> </have:colourCode><have:colourDescription>...</have:colourDescription> </have:facilityColourStatus> </have:facility> <have:facility> <have:facilityInformation> <have:facilityID>NB-Moncton</have:facilityID> <have:facilityName>Moncton NB</have:facilityName> <have:facilityGeoLocation> <edxl-ct:EDXLGeoLocation> <gml:Point gml:id="NBMoncton"> <gml:pos>46.104977 -64.805840</gml:pos> </gml:Point> </edxl-ct:EDXLGeoLocation> </have:facilityGeoLocation> <have:facilityDetails> <n:OrganisationName> </n:OrganisationName> </have:facilityDetails> </have:facilityInformation> <have:serviceList> <have:taxonomyURI> </have:taxonomyURI> <have:taxonomyName> </have:taxonomyName> <have:serviceListItem> <have:serviceTaxonomyKeyValue>trauma.level2.adult</have:serviceTaxonomyKeyValue> <have:serviceName>Trauma Level 2 - Adult</have:serviceName> <have:serviceStatus> <have:isAvailable>true</have:isAvailable> <have:colourStatus> <have:colourCodeDefault> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>yellow</edxl-ct:Value> </have:colourCodeDefault> <have:colourDescription>Trauma services are approaching capacity and incoming levels may exceed.</have:colourDescription> </have:colourStatus> <have:comment>Trauma levels are reaching capacity</have:comment> <have:stability>deteriorating</have:stability> </have:serviceStatus> </have:serviceListItem> <have:serviceListItem> <have:serviceTaxonomyKeyValue>trauma.level2.pediatric</have:serviceTaxonomyKeyValue> <have:serviceName>Trauma Level 2 - Pediatric</have:serviceName> </have:serviceListItem> </have:serviceList> <have:facilityColourStatus> <have:colourCode> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>yellow</edxl-ct:Value> </have:colourCode><have:colourDescription>Norovirus outbreak has reduced staffing levels and increases ICU counts.</have:colourDescription> </have:facilityColourStatus> </have:facility> <have:facility> <have:facilityInformation> <have:facilityID>NB-Fredericton</have:facilityID> <have:facilityName>Dr. Everett Chalmers Regional Hospital</have:facilityName> <have:facilityGeoLocation> <edxl-ct:EDXLGeoLocation> <gml:Point gml:id="NBFrederictonHospital"> <gml:pos>45.939358 -66.654633</gml:pos> </gml:Point> </edxl-ct:EDXLGeoLocation> </have:facilityGeoLocation> <have:facilityDetails> <n:OrganisationName> </n:OrganisationName> <xpil:Addresses> <xpil:Address> <xal:Country> <xal:NameElement>CANADA</xal:NameElement> </xal:Country> <xal:AdministrativeArea> <xal:NameElement>New Brunswick</xal:NameElement> </xal:AdministrativeArea> <xal:Locality> <xal:NameElement>Fredericton</xal:NameElement> </xal:Locality> </xpil:Address> </xpil:Addresses> </have:facilityDetails> <have:clinicalStatusDefault>Normal</have:clinicalStatusDefault> <have:emergencyDepartmentStatus><have:emsCapacity><have:triageCode> <have:triageCodeValue>Red</have:triageCodeValue> <have:triageCountQuantity>2</have:triageCountQuantity> </have:triageCode></have:emsCapacity></have:emergencyDepartmentStatus> </have:facilityInformation> <have:serviceList> <have:taxonomyURI> </have:taxonomyURI> <have:taxonomyName> </have:taxonomyName> <have:serviceListItem> <have:serviceTaxonomyKeyValue>trauma.level2.adult</have:serviceTaxonomyKeyValue> <have:serviceName>Trauma Level 2 - Adult</have:serviceName> <have:serviceStatus> <have:isAvailable>true</have:isAvailable> <have:colourStatus> <have:colourCodeDefault> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>green</edxl-ct:Value> </have:colourCodeDefault> </have:colourStatus> <have:comment>Trauma levels are normal</have:comment> <have:stability>stable</have:stability> </have:serviceStatus> <have:serviceBedCapacity> <have:availableCount>6</have:availableCount> <have:baselineCount>8</have:baselineCount> <have:capacityNote/> </have:serviceBedCapacity> </have:serviceListItem> <have:serviceListItem> <have:serviceTaxonomyKeyValue>trauma.level2.pediatric</have:serviceTaxonomyKeyValue> <have:serviceName>Trauma Level 2 - Pediatric</have:serviceName> <have:serviceStatus> <have:isAvailable>true</have:isAvailable> <have:colourStatus> <have:colourCodeDefault> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>green</edxl-ct:Value> </have:colourCodeDefault> </have:colourStatus> <have:comment>Trauma levels are normal</have:comment> </have:serviceStatus> </have:serviceListItem> </have:serviceList> <have:facilityColourStatus> <have:colourCode> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>green</edxl-ct:Value> </have:colourCode><have:colourDescription>...</have:colourDescription> </have:facilityColourStatus> </have:facility> <have:facility> <have:facilityInformation> <have:facilityID>ME-CalaisRegional</have:facilityID> <have:facilityName>Calais Regional Hospital</have:facilityName> <have:facilityGeoLocation> <edxl-ct:EDXLGeoLocation> <gml:Point gml:id="MECalaisRegionalHospital"> <gml:pos>45.179604 -67.268234</gml:pos> </gml:Point> </edxl-ct:EDXLGeoLocation> </have:facilityGeoLocation> <have:facilityDetails> <n:OrganisationName> </n:OrganisationName> <xpil:Addresses> <xpil:Address> <xal:Country> <xal:NameElement>USA</xal:NameElement> </xal:Country> <xal:AdministrativeArea> <xal:NameElement>Maine</xal:NameElement> </xal:AdministrativeArea> <xal:Locality> <xal:NameElement>Calais</xal:NameElement> </xal:Locality> </xpil:Address> </xpil:Addresses> </have:facilityDetails> <have:clinicalStatusDefault>Normal</have:clinicalStatusDefault> <have:emergencyDepartmentStatus><have:emsCapacity><have:triageCode> <have:triageCodeValue>Red</have:triageCodeValue> <have:triageCountQuantity>2</have:triageCountQuantity> </have:triageCode></have:emsCapacity></have:emergencyDepartmentStatus> </have:facilityInformation> <have:serviceList> <have:taxonomyURI> </have:taxonomyURI> <have:taxonomyName> </have:taxonomyName> <have:serviceListItem> <have:serviceTaxonomyKeyValue>trauma.level3.adult</have:serviceTaxonomyKeyValue> <have:serviceName>Trauma Level 3 - Adult</have:serviceName> <have:serviceStatus> <have:isAvailable>true</have:isAvailable> <have:colourStatus> <have:colourCodeDefault> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>green</edxl-ct:Value> </have:colourCodeDefault> </have:colourStatus> <have:comment>Trauma levels are normal</have:comment> <have:stability>stable</have:stability> </have:serviceStatus> <have:serviceBedCapacity> <have:availableCount>6</have:availableCount> <have:baselineCount>8</have:baselineCount> <have:capacityNote/> </have:serviceBedCapacity> </have:serviceListItem> </have:serviceList> <have:facilityColourStatus> <have:colourCode> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>green</edxl-ct:Value> </have:colourCode><have:colourDescription>...</have:colourDescription> </have:facilityColourStatus> </have:facility> <have:facility> <have:facilityInformation> <have:facilityID>ME-DownEastCommunityHospital</have:facilityID> <have:facilityName>Down East Community Hospital</have:facilityName> <have:facilityGeoLocation> <edxl-ct:EDXLGeoLocation> <gml:Point gml:id="MEDownEastCommunityHospital"> <gml:pos>44.815426 -67.582352</gml:pos> </gml:Point> </edxl-ct:EDXLGeoLocation> </have:facilityGeoLocation> <have:facilityDetails> <n:OrganisationName> </n:OrganisationName> <xpil:Addresses> <xpil:Address> <xal:Country> <xal:NameElement>USA</xal:NameElement> </xal:Country> <xal:AdministrativeArea> <xal:NameElement>Maine</xal:NameElement> </xal:AdministrativeArea> <xal:Locality> <xal:NameElement>Down East</xal:NameElement> </xal:Locality> </xpil:Address> </xpil:Addresses> </have:facilityDetails> <have:clinicalStatusDefault>Normal</have:clinicalStatusDefault> <have:emergencyDepartmentStatus><have:emsCapacity><have:triageCode> <have:triageCodeValue>Red</have:triageCodeValue> <have:triageCountQuantity>2</have:triageCountQuantity> </have:triageCode></have:emsCapacity></have:emergencyDepartmentStatus> </have:facilityInformation> <have:serviceList> <have:taxonomyURI> </have:taxonomyURI> <have:taxonomyName> </have:taxonomyName> <have:serviceListItem> <have:serviceTaxonomyKeyValue>trauma.level3.adult</have:serviceTaxonomyKeyValue> <have:serviceName>Trauma Level 3 - Adult</have:serviceName> <have:serviceStatus> <have:isAvailable>true</have:isAvailable> <have:colourStatus> <have:colourCodeDefault> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>green</edxl-ct:Value> </have:colourCodeDefault> </have:colourStatus> <have:comment>Trauma levels are normal</have:comment> <have:stability>stable</have:stability> </have:serviceStatus> <have:serviceBedCapacity> <have:availableCount>6</have:availableCount> <have:baselineCount>8</have:baselineCount> <have:capacityNote/> </have:serviceBedCapacity> </have:serviceListItem> </have:serviceList> <have:facilityColourStatus> <have:colourCode> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>green</edxl-ct:Value> </have:colourCode><have:colourDescription>...</have:colourDescription> </have:facilityColourStatus> </have:facility> <have:facility> <have:facilityInformation> <have:facilityID>ME-EasternMaineMedicalCentre</have:facilityID> <have:facilityName>Eastern Maine Medical Centre</have:facilityName> <have:facilityGeoLocation> <edxl-ct:EDXLGeoLocation> <gml:Point gml:id="MEEasternMaineMedicalCentre"> <gml:pos>44.807873 -68.751991</gml:pos> </gml:Point> </edxl-ct:EDXLGeoLocation> </have:facilityGeoLocation> <have:facilityDetails> <n:OrganisationName> </n:OrganisationName> <xpil:Addresses> <xpil:Address> <xal:Country> <xal:NameElement>USA</xal:NameElement> </xal:Country> <xal:AdministrativeArea> <xal:NameElement>Maine</xal:NameElement> </xal:AdministrativeArea> <xal:Locality> <xal:NameElement>Bangor</xal:NameElement> </xal:Locality> </xpil:Address> </xpil:Addresses> </have:facilityDetails> <have:clinicalStatusDefault>Normal</have:clinicalStatusDefault> <have:emergencyDepartmentStatus><have:emsCapacity><have:triageCode> <have:triageCodeValue>Red</have:triageCodeValue> <have:triageCountQuantity>2</have:triageCountQuantity> </have:triageCode></have:emsCapacity></have:emergencyDepartmentStatus> </have:facilityInformation> <have:serviceList> <have:taxonomyURI> </have:taxonomyURI> <have:taxonomyName> </have:taxonomyName> <have:serviceListItem> <have:serviceTaxonomyKeyValue>trauma.level1.adult</have:serviceTaxonomyKeyValue> <have:serviceName>Trauma Level 1 - Adult</have:serviceName> <have:serviceStatus> <have:isAvailable>true</have:isAvailable> <have:colourStatus> <have:colourCodeDefault> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>green</edxl-ct:Value> </have:colourCodeDefault> </have:colourStatus> <have:comment>Trauma levels are normal</have:comment> <have:stability>stable</have:stability> </have:serviceStatus> <have:serviceBedCapacity> <have:availableCount>6</have:availableCount> <have:baselineCount>8</have:baselineCount> <have:capacityNote/> </have:serviceBedCapacity> </have:serviceListItem> <have:serviceListItem> <have:serviceTaxonomyKeyValue>trauma.level1.pediatric</have:serviceTaxonomyKeyValue> <have:serviceName>Trauma Level 1 - Pediatric</have:serviceName> <have:serviceStatus> <have:isAvailable>true</have:isAvailable> <have:colourStatus> <have:colourCodeDefault> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>yellow</edxl-ct:Value> </have:colourCodeDefault> </have:colourStatus> <have:comment>Trauma levels are reaching capacity</have:comment> <have:stability>stable</have:stability> </have:serviceStatus> <have:serviceBedCapacity> <have:availableCount>2</have:availableCount> <have:baselineCount>8</have:baselineCount> <have:capacityNote/> </have:serviceBedCapacity> </have:serviceListItem> </have:serviceList> <have:facilityColourStatus> <have:colourCode> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>green</edxl-ct:Value> </have:colourCode><have:colourDescription>...</have:colourDescription> </have:facilityColourStatus> </have:facility> <have:facility> <have:facilityInformation> <have:facilityID>ME-StJosephHospital</have:facilityID> <have:facilityName>Saint Joseph Hospital</have:facilityName> <have:facilityGeoLocation> <edxl-ct:EDXLGeoLocation> <gml:Point gml:id="MEStJosephHospital"> <gml:pos>44.814709 -68.771454</gml:pos> </gml:Point> </edxl-ct:EDXLGeoLocation> </have:facilityGeoLocation> <have:facilityDetails> <n:OrganisationName> </n:OrganisationName> <xpil:Addresses> <xpil:Address> <xal:Country> <xal:NameElement>USA</xal:NameElement> </xal:Country> <xal:AdministrativeArea> <xal:NameElement>Maine</xal:NameElement> </xal:AdministrativeArea> <xal:Locality> <xal:NameElement>Bangor</xal:NameElement> </xal:Locality> </xpil:Address> </xpil:Addresses> </have:facilityDetails> <have:clinicalStatusDefault>Normal</have:clinicalStatusDefault> <have:emergencyDepartmentStatus><have:emsCapacity><have:triageCode> <have:triageCodeValue>Red</have:triageCodeValue> <have:triageCountQuantity>2</have:triageCountQuantity> </have:triageCode></have:emsCapacity></have:emergencyDepartmentStatus> </have:facilityInformation> <have:serviceList> <have:taxonomyURI> </have:taxonomyURI> <have:taxonomyName> </have:taxonomyName> <have:serviceListItem> <have:serviceTaxonomyKeyValue>trauma.level2.adult</have:serviceTaxonomyKeyValue> <have:serviceName>Trauma Level 2 - Adult</have:serviceName> <have:serviceStatus> <have:isAvailable>true</have:isAvailable> <have:colourStatus> <have:colourCodeDefault> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>green</edxl-ct:Value> </have:colourCodeDefault> </have:colourStatus> <have:comment>Trauma levels are normal</have:comment> <have:stability>stable</have:stability> </have:serviceStatus> <have:serviceBedCapacity> <have:availableCount>6</have:availableCount> <have:baselineCount>8</have:baselineCount> <have:capacityNote/> </have:serviceBedCapacity> </have:serviceListItem> <have:serviceListItem> <have:serviceTaxonomyKeyValue>trauma.level2.pediatric</have:serviceTaxonomyKeyValue> <have:serviceName>Trauma Level 2 - Pediatric</have:serviceName> <have:serviceStatus> <have:isAvailable>true</have:isAvailable> <have:colourStatus> <have:colourCodeDefault> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>red</edxl-ct:Value> </have:colourCodeDefault> </have:colourStatus> <have:comment>Trauma levels are at capacity</have:comment> <have:stability>stable</have:stability> </have:serviceStatus> <have:serviceBedCapacity> <have:availableCount>6</have:availableCount> <have:baselineCount>6</have:baselineCount> <have:capacityNote/> </have:serviceBedCapacity> </have:serviceListItem> </have:serviceList> <have:facilityColourStatus> <have:colourCode> <edxl-ct:ValueListURI>urn:oasis:names:tc:emergency:EDXL:HAVE:2.0:Defaults:ColourCode</edxl-ct:ValueListURI> <edxl-ct:Value>green</edxl-ct:Value> </have:colourCode><have:colourDescription>...</have:colourDescription> </have:facilityColourStatus> </have:facility> </have:HAVE>
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:have="urn:oasis:names:tc:emergency:edxl:have:2.0" xmlns:edxl-ct="urn:oasis:names:tc:emergency:edxl:ct:1.0" xmlns:edxl-gsf="urn:oasis:names:tc:emergency:edxl:gsf:1.0" xmlns:gml="http://www.opengis.net/gml/3.2" version="1.0"> <!-- creates list items for linking a list of hospitals --> <xsl:template name="FacilityLI"> <xsl:variable name="FacilityID"><xsl:value-of select="have:facilityInformation/have:facilityID" /></xsl:variable> <xsl:if test="price > 10"> </xsl:if> <li><xsl:call-template name="ColourCodeFacility"/><a href="#{$FacilityID}"> <xsl:value-of select="have:facilityInformation/have:facilityName"/></a></li> </xsl:template> <xsl:template name="FacilityBlock"> <hr /> <xsl:variable name="FacilityID"><xsl:value-of select="have:facilityInformation/have:facilityID" /></xsl:variable> <h2 id="{$FacilityID}"><xsl:value-of select="have:facilityInformation/have:facilityName"/></h2> <div>TODO: get Facility Details listed here for facility.</div> <div>LOCATION:</div><xsl:call-template name="GeoLocationBlock"/> <div>SERVICES: <ul> <xsl:for-each select="have:serviceList/have:serviceListItem"> <li> <xsl:call-template name="ServiceListItemBlock"/> </li> </xsl:for-each> </ul> </div> </xsl:template> <xsl:template name="ColourCodeFacility"> <!-- TODO - create colour-code images and then use to generate diff filenames Take COLOUR CODE and get image name --> <xsl:variable name="serviceColour"><xsl:value-of select="have:facilityColourStatus/have:colourCode/edxl-ct:Value" /></xsl:variable> <!-- DEBUG <xsl:value-of select="$serviceColour"/> --> <xsl:choose> <xsl:when test ="$serviceColour != ''"> <img height="16" width="16" src="./img/{$serviceColour}.png"/> </xsl:when> <xsl:otherwise><img height="16" width="16" src="./img/flag_black.png"/> </xsl:otherwise> </xsl:choose> <!-- <img height="16" width="16" src="./img/ems.operations.emergencyMedical.hospital.png"/> --> </xsl:template> <xsl:template name="ColourCodeService"> <!-- TODO - create colour-code images and then use to generate diff filenames Take COLOUR CODE and get image name --> <xsl:variable name="serviceColour"><xsl:value-of select="have:serviceStatus/have:colourStatus/have:colourCodeDefault/edxl-ct:Value" /></xsl:variable> <!-- DEBUG <xsl:value-of select="$serviceColour"/> --> <xsl:choose> <xsl:when test ="$serviceColour != ''"> <img height="16" width="16" src="./img/{$serviceColour}.png"/> </xsl:when> <xsl:otherwise><img height="16" width="16" src="./img/flag_black.png"/> </xsl:otherwise> </xsl:choose> <!-- <img height="16" width="16" src="./img/ems.operations.emergencyMedical.hospital.png"/> --> </xsl:template> <xsl:template name="ServiceListItemBlock"> <xsl:variable name="serviceColour"><xsl:value-of select="have:serviceStatus/have:colourStatus/have:colourCodeDefault/edxl-ct:Value" /></xsl:variable> <!-- <xsl:value-of select="have:serviceStatus/have:colourStatus/have:colourCodeDefault/edxl-ct:Value" /> </xsl:variable> --> <xsl:call-template name="ColourCodeService"/><xsl:value-of select="have:serviceName" /> </xsl:template> <xsl:template name="GeoLocationBlock"> <br />COORDS: <xsl:value-of select="have:facilityInformation/have:facilityGeoLocation/edxl-ct:EDXLGeoLocation/gml:Point/gml:pos"/> </xsl:template> <xsl:template match="/"> <html> <head> <!-- TODO: add in CSS and basic JS to hop on list. --> </head> <body> <h1>Hospital Availability (EDXL-HAVE) Demonstration - Centre for Security Science</h1> <div> <ul> <xsl:for-each select="have:HAVE/have:facility"> <xsl:call-template name="FacilityLI"/> </xsl:for-each> </ul> <xsl:for-each select="have:HAVE/have:facility"> <xsl:call-template name="FacilityBlock"/> <!-- <h2><xsl:value-of select="have:facilityInformation/have:facilityName"/></h2> --> </xsl:for-each> </div> </body> </html> </xsl:template> </xsl:stylesheet>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]