CDA_StyleSheet_Total_ver4.xsl 96 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:n1="urn:hl7-org:v3" xmlns:in="urn:inline-variable-data">
  3. <xsl:output method="html" indent="yes" version="4.01" encoding="ISO-8859-1" doctype-system="http://www.w3.org/TR/html4/strict.dtd" doctype-public="-//W3C//DTD HTML 4.01//EN"/>
  4. <xsl:param name="limit-external-images" select="'yes'"/>
  5. <!-- ##################### variable ##################### -->
  6. <xsl:variable name="lc" select="'abcdefghijklmnopqrstuvwxyz'" />
  7. <xsl:variable name="uc" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
  8. <xsl:variable name="simple-sanitizer-match">
  9. <xsl:text>&#10;&#13;&#34;&#39;&#58;&#59;&#63;&#96;&#123;&#125;&#8220;&#8221;&#8222;&#8218;&#8217;</xsl:text>
  10. </xsl:variable>
  11. <xsl:variable name="simple-sanitizer-replace" select="'***************'"/>
  12. <xsl:variable name="javascript-injection-warning">WARNING: Javascript injection attempt detected in source CDA document. Terminating</xsl:variable>
  13. <xsl:variable name="malicious-content-warning">WARNING: Potentially malicious content found in CDA document.</xsl:variable>
  14. <!--section counting variable-->
  15. <xsl:variable name="totalCount" select="count(/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component[n1:section])"/>
  16. <xsl:variable name="medicationCount" select="count(/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component[n1:section/n1:code/@code='10160-0']/n1:section/n1:text/n1:table/n1:tbody/n1:tr)"/>
  17. <xsl:variable name="procedureCount" select="count(/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component[n1:section/n1:code/@code='47519-4']/n1:section/n1:text/n1:table/n1:tbody/n1:tr)"/>
  18. <xsl:variable name="specimenCount" select="count(/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component[n1:section/n1:code/@code='30954-2']/n1:section/n1:entry[n1:organizer/n1:id/@extension='Specimen'])"/>
  19. <xsl:variable name="pathologyCount" select="count(/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component[n1:section/n1:code/@code='30954-2']/n1:section/n1:entry[n1:organizer/n1:id/@extension='Pathology'])"/>
  20. <xsl:variable name="radiologyCount" select="count(/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component[n1:section/n1:code/@code='30954-2']/n1:section/n1:entry[n1:organizer/n1:id/@extension='Radiology'])"/>
  21. <xsl:variable name="functionalCount" select="count(/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component[n1:section/n1:code/@code='30954-2']/n1:section/n1:entry[n1:organizer/n1:id/@extension='Functional'])"/>
  22. <xsl:variable name="documentType" select="/n1:ClinicalDocument/n1:code/@code"/>
  23. <xsl:variable name="organizationOid" select="/n1:ClinicalDocument/n1:custodian/n1:assignedCustodian/n1:representedCustodianOrganization/n1:id/@root"/>
  24. <!--BPPC variable-->
  25. <xsl:variable name="consentSubjectRelationship">
  26. <xsl:call-template name="getGuardianRelationship">
  27. <xsl:with-param name="code" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:code/@code"/>
  28. </xsl:call-template>
  29. </xsl:variable>
  30. <xsl:variable name="consentSubjectName">
  31. <xsl:choose>
  32. <xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:guardianPerson/n1:name/n1:given != '' or /n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:guardianPerson/n1:name/n1:family !=''">
  33. <xsl:call-template name="show-name-kr">
  34. <xsl:with-param name="name" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:guardianPerson/n1:name"/>
  35. </xsl:call-template>
  36. </xsl:when>
  37. <xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:name/n1:given != '' or /n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:name/n1:family">
  38. <xsl:call-template name="show-name-kr">
  39. <xsl:with-param name="name" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:name"/>
  40. </xsl:call-template>
  41. </xsl:when>
  42. <xsl:otherwise></xsl:otherwise>
  43. </xsl:choose>
  44. </xsl:variable>
  45. <xsl:variable name="consentSubjectTelecom">
  46. <xsl:choose>
  47. <xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:telecom/@value != ''">
  48. <xsl:call-template name="show-telecom-kr">
  49. <xsl:with-param name="telecom" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:telecom"/>
  50. </xsl:call-template>
  51. </xsl:when>
  52. <xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:telecom/@value != ''">
  53. <xsl:call-template name="show-telecom-kr">
  54. <xsl:with-param name="telecom" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:telecom"/>
  55. </xsl:call-template>
  56. </xsl:when>
  57. <xsl:otherwise></xsl:otherwise>
  58. </xsl:choose>
  59. </xsl:variable>
  60. <xsl:variable name="isBppc">
  61. <xsl:choose>
  62. <xsl:when test="count(/n1:ClinicalDocument/n1:templateId[@root='1.2.410.100110.40.2.2.1.1'])&gt;0">
  63. <xsl:value-of select="1"/>
  64. </xsl:when>
  65. <xsl:when test="count(/n1:ClinicalDocument/n1:templateId[@root='1.2.410.100110.40.2.2.1.2'])&gt;0">
  66. <xsl:value-of select="2"/>
  67. </xsl:when>
  68. <xsl:otherwise>
  69. <xsl:value-of select="0"/>
  70. </xsl:otherwise>
  71. </xsl:choose>
  72. </xsl:variable>
  73. <!-- document title -->
  74. <xsl:variable name="title">
  75. <xsl:choose>
  76. <xsl:when test="string-length(/n1:ClinicalDocument/n1:title) &gt;= 1">
  77. <xsl:value-of select="/n1:ClinicalDocument/n1:title"/>
  78. </xsl:when>
  79. <xsl:when test="/n1:ClinicalDocument/n1:code/@displayName">
  80. <xsl:value-of select="/n1:ClinicalDocument/n1:code/@displayName"/>
  81. </xsl:when>
  82. <xsl:otherwise>
  83. <xsl:text>Clinical Document</xsl:text>
  84. </xsl:otherwise>
  85. </xsl:choose>
  86. </xsl:variable>
  87. <!-- /##################### variable ##################### -->
  88. <!-- Main -->
  89. <xsl:template match="/">
  90. <xsl:apply-templates select="n1:ClinicalDocument"/>
  91. </xsl:template>
  92. <xsl:template match="n1:ClinicalDocument">
  93. <html xml:lang="ko">
  94. <head>
  95. <meta http-equiv='X-UA-Compatible' content='IE=8'/>
  96. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  97. <meta http-equiv="Content-Script-Type" content="text/javascript" />
  98. <meta http-equiv="Content-Style-Type" content="text/css" />
  99. <title>
  100. <xsl:value-of select="$title"/>
  101. </title>
  102. <xsl:call-template name="chooseCSS"/>
  103. </head>
  104. <body>
  105. <xsl:call-template name="chooseBody"/>
  106. <script type="text/javascript">
  107. <xsl:comment>
  108. <![CDATA[
  109. function Expend(spn) {
  110. var img = spn.firstChild;
  111. var div = spn.parentNode.parentNode.lastChild;
  112. if (div.style.display == "none") {
  113. div.style.display = "";
  114. img.src = "data:image/gif;base64,R0lGODlhDQAIAIABAGZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4zLWMwMTEgNjYuMTQ1NjYxLCAyMDEyLzAyLzA2LTE0OjU2OjI3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M2IChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCQjRBQUMxQzM3NTUxMUU2OTcxNUQ5MkMyMDQwMjgxMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCQjRBQUMxRDM3NTUxMUU2OTcxNUQ5MkMyMDQwMjgxMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkJCNEFBQzFBMzc1NTExRTY5NzE1RDkyQzIwNDAyODExIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkJCNEFBQzFCMzc1NTExRTY5NzE1RDkyQzIwNDAyODExIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAQAsAAAAAA0ACAAAAhIEgpnGuhaakhEieiF+e1o3gQUAOw==";
  115. }
  116. else {
  117. div.style.display = "none";
  118. img.src = "data:image/gif;base64,R0lGODlhDQAIAIABAGZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4zLWMwMTEgNjYuMTQ1NjYxLCAyMDEyLzAyLzA2LTE0OjU2OjI3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M2IChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFNUM2NDM2QTM3NTUxMUU2QjQ5MUVBMkYxN0E2MzQ2OSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFNUM2NDM2QjM3NTUxMUU2QjQ5MUVBMkYxN0E2MzQ2OSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkU1QzY0MzY4Mzc1NTExRTZCNDkxRUEyRjE3QTYzNDY5IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkU1QzY0MzY5Mzc1NTExRTZCNDkxRUEyRjE3QTYzNDY5Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAQAsAAAAAA0ACAAAAhOMD6cKvdzci4HCZGyVyOnLTUABADs=";
  119. }
  120. }
  121. function popupView(page)
  122. {
  123. try{
  124. window.open(page, "", "width=1024px,height=768px,alwaysRaised=yes,resizable=yes,center=yes,status=no");
  125. }
  126. catch(exception){
  127. }
  128. }
  129. function popupViewNew(url, kosUid, oragnizationOid)
  130. {
  131. try{
  132. var page = url;
  133. var mapForm = document.createElement("form");
  134. var milliseconds = new Date().getTime();
  135. var windowName = page + milliseconds;
  136. var enc = "";
  137. mapForm.target = windowName;
  138. mapForm.method = "POST";
  139. mapForm.action = page;
  140. var mapInput = document.createElement("input");
  141. mapInput.type = "hidden";
  142. mapInput.name = "document_uid";
  143. mapInput.value = kosUid;
  144. mapForm.appendChild(mapInput);
  145. var mapInput2 = document.createElement("input");
  146. mapInput2.type = "hidden";
  147. mapInput2.name = "hospital_oid"
  148. mapInput2.value = oragnizationOid;
  149. mapForm.appendChild(mapInput2);
  150. var mapInput3 = document.createElement("input");
  151. mapInput3.type = "hidden";
  152. mapInput3.name = "mpi_id";
  153. mapInput3.value = null;
  154. mapForm.appendChild(mapInput3);
  155. document.body.appendChild(mapForm);
  156. mapForm.submit();
  157. }
  158. catch(exception)
  159. { }
  160. }
  161. ]]>
  162. </xsl:comment>
  163. </script>
  164. </body>
  165. </html>
  166. </xsl:template>
  167. <!-- CSS -->
  168. <!-- New-version CSS-->
  169. <xsl:template name="chooseCSS">
  170. <xsl:choose>
  171. <!--BPPC-->
  172. <xsl:when test="$documentType = &apos;57016-8&apos;">
  173. <xsl:call-template name="addBpccCSS"/>
  174. </xsl:when>
  175. <xsl:otherwise>
  176. <xsl:call-template name="addCSS"/>
  177. </xsl:otherwise>
  178. </xsl:choose>
  179. </xsl:template>
  180. <xsl:template name="addBpccCSS">
  181. <style type="text/css">
  182. <xsl:text>
  183. /* Reset */
  184. *{margin:0;padding:0}
  185. html, body {width:100%; height:100%; margin:0; padding:0; font-family:'맑은 고딕', '맑은고딕',Nanum Gothic, NanumGothic, '나눔고딕', '나눔 고딕', 'Nanum Gothic', 'NanumGothic', Dotum, '돋움', Gulim, '굴림',sans-serif;}
  186. body{font-size:12px; word-break:break-all;-ms-word-break:break-all;}
  187. a, address, blockquote, br, fieldset, legend, label, form, input, select, textarea, button, table, th, td caption, cite, code, dl, dt, dd, h1, h2, h3, h4, h5, h6, p, div, iframe, ul, ol, li, hr, form, img{margin:0; padding:0;}
  188. h1, h2, h3, h4, h5, h6 {font-size:12px; text-align:left;}
  189. ul, ol, li {list-style:none;}
  190. abbr,acronym {border:0;}
  191. img{vertical-align:middle; border:none;}
  192. img, fieldset{border:none;}
  193. iframe{border-style: none;
  194. border-color: inherit;
  195. border-width: 0;}
  196. em, address{font-style:normal;}
  197. textarea{overflow:auto;}
  198. table{border-collapse:collapse; border-spacing:0;}
  199. input, select, textarea{font-size:100%; vertical-align:middle; box-sizing:border-box;}
  200. /* Hyper Link */
  201. a,
  202. a:link,
  203. a:visited{text-decoration:none !important;}
  204. a:active,
  205. a:hover{text-decoration:none !important;}
  206. /* Hidden Content */
  207. .skip{font-size: 1px; height: 1px; line-height: 1px; overflow: hidden; position: absolute; text-indent: 4px; white-space: nowrap; width: 1px;}
  208. /* hr , legend , caption */
  209. hr, legend, caption{clear:both; display:none; list-style:none; position:absolute; top:0; left:0; width:0; height:0; margin:0; padding:0; border:0; background:none; font-size:0px; line-height:0; visibility:hidden;}
  210. /* Png IE6 */
  211. * html .png24{tmp:expression(setPng24(this));}
  212. /* fix */
  213. .fix{*zoom:1;}
  214. .fix:after{content:""; clear:both; display:block;}
  215. /* Lang Exchange */
  216. .en{ime-mode:disabled; }
  217. .kr{ime-mode:active; }
  218. /* Cursor */
  219. .hand{cursor:pointer;}
  220. /* float */
  221. .fl{float:left;}
  222. .fr{float:right;}
  223. .clear{clear:both;}
  224. /* margin */
  225. .mgt5{margin-top:5px !important;}
  226. .mgt10{margin-top:10px !important;}
  227. .mgt15{margin-top:15px !important;}
  228. .mgt20{margin-top:20px !important;}
  229. .mgt25{margin-top:25px !important;}
  230. .mgt30{margin-top:30px !important;}
  231. .mgt35{margin-top:35px !important;}
  232. .mgt40{margin-top:40px !important;}
  233. .mgt45{margin-top:45px !important;}
  234. .mgt50{margin-top:50px !important;}
  235. .mgt55{margin-top:55px !important;}
  236. .mgt60{margin-top:60px !important;}
  237. .mgt70{margin-top:70px !important;}
  238. .mgt90{margin-top:90px !important;}
  239. .mgb5{margin-bottom:5px !important;}
  240. .mgb7{margin-bottom:7px !important;}
  241. .mgb10{margin-bottom:10px !important;}
  242. .mgb14{margin-bottom:14px !important;}
  243. .mgb15{margin-bottom:15px !important;}
  244. .mgb17{margin-bottom:17px !important;}
  245. .mgb20{margin-bottom:20px !important;}
  246. .mgb25{margin-bottom:25px !important;}
  247. .mgb30{margin-bottom:30px !important;}
  248. .mgb35{margin-bottom:35px !important;}
  249. .mgb40{margin-bottom:40px !important;}
  250. .mgb45{margin-bottom:45px !important;}
  251. .mgb50{margin-bottom:50px !important;}
  252. .mgb55{margin-bottom:55px !important;}
  253. .mgb60{margin-bottom:60px !important;}
  254. .mgb65{margin-bottom:65px !important;}
  255. .mgb80{margin-bottom:80px !important;}
  256. .mgb90{margin-bottom:90px !important;}
  257. .mgl5{margin-left:5px !important;}
  258. .mgl10{margin-left:10px !important;}
  259. .mgl15{margin-left:15px !important;}
  260. .mgl20{margin-left:20px !important;}
  261. .mgl25{margin-left:25px !important;}
  262. .mgl30{margin-left:30px !important;}
  263. .mgl35{margin-left:35px !important;}
  264. .mgl40{margin-left:40px !important;}
  265. .mgl45{margin-left:45px !important;}
  266. .mgl50{margin-left:50px !important;}
  267. .mgl55{margin-left:55px !important;}
  268. .mgl60{margin-left:60px !important;}
  269. .mgr5{margin-right:5px !important;}
  270. .mgr10{margin-right:10px !important;}
  271. .mgr15{margin-right:15px !important;}
  272. .mgr20{margin-right:20px !important;}
  273. .mgr25{margin-right:25px !important;}
  274. .mgr30{margin-right:30px !important;}
  275. .mgr35{margin-right:35px !important;}
  276. .mgr40{margin-right:40px !important;}
  277. .mgr45{margin-right:45px !important;}
  278. .mgr50{margin-right:50px !important;}
  279. .mgr55{margin-right:55px !important;}
  280. .mgr60{margin-right:60px !important;}
  281. .center{text-align:center !important;}
  282. .left{text-align:left !important;}
  283. .right{text-align:right !important;}
  284. /*색상 바꾸기*/
  285. .color_bg{text-align:center; position:absolute; top:3px; right:20px; padding:0 !important; margin:0 !important;}
  286. .color_bg li{margin:3px; display:inline-block; width:15px; height:15px;}
  287. .color_bg li a{padding:0 !important; display:inline-block; width:15px; height:15px !important; border-radius:5px; border:1px solid #fff;}
  288. .color_bg .blue{background:#306BBB !important;}
  289. .color_bg .green{background:#189922 !important;}
  290. .color_bg .mint{background:#26cd99 !important;}
  291. .color_bg .orange{background:#ff9900 !important;}
  292. .color_bg .violet{background:#5b39b1 !important;}
  293. body,html{background:#F4F4F4;}
  294. .body_wrap{width:700px; margin:0 auto; }
  295. .wrap{width:690px; margin:17px auto 30px;}
  296. .header h1{border:1px solid #DBDBDB; background:#fff; font-size:24px; font-weight:600; padding:15px; text-align:center;}
  297. .contents{margin-top:17px; border:1px solid #DBDBDB; border-top:2px solid #215fb4; background:#fff; padding:17px 26px 20px 26px;}
  298. .contents h2{font-size:14px; font-weight:600; margin-bottom:16px; line-height:1.4;}
  299. .contents h2 strong{font-weight:600; color:#215fb4;}
  300. .contents .info_agree{ font-size:13px; width:100%;}
  301. .contents .info_agree th{border:1px solid #DBDBDB; font-size:13px; background:#f9f9f9; color:#000; padding:3px 0px; font-weight:600; padding:6px;}
  302. .contents .info_agree td{border:1px solid #DBDBDB; font-size:12px; color:#666; line-height:1.4; padding:6px;}
  303. .agreement{margin:17px 0;}
  304. .agreement div{border:1px solid #DBDBDB; border-left:2px solid #215fb4; background:#fff; margin:4px 0; padding:15px 25px; font-size:13px; font-weight:400; color:#666;}
  305. .agreement div strong{font-weight:500;}
  306. .agreement div p{float:right;}
  307. .agreement div p input{margin-right:5px;}
  308. .agreement div p label{margin-right:5px;}
  309. .contents1{border:1px solid #DBDBDB; border-left:2px solid #215fb4; background:#fff; }
  310. .chk_agree{font-size:13px; font-weight:600; float:left; margin:10px 15px;}
  311. .chk_agree td{padding:1px 10px;}
  312. .chk_agree td input{border:1px solid #cecece; height:25px;}
  313. .date_year{width:41.5px;}
  314. .date_mon{width:41.5px;}
  315. .date_day{width:41.5px;}
  316. .comm_input{width:210px;}
  317. .chk_input{width:200px; height:120px; margin-left:5px;}
  318. .sign{float:right; border-left:1px solid #DBDBDB; padding:16px 0 18px 25px; font-size:15px; font-weight:600; width:150px; height:95px;}
  319. </xsl:text>
  320. </style>
  321. </xsl:template>
  322. <!-- AS-IS CSS -->
  323. <xsl:template name="addCSS">
  324. <style type="text/css">
  325. <xsl:text>
  326. /* Reset */
  327. *{margin:0;padding:0}
  328. html, body {width:100%; height:100%; margin:0; padding:0; font-family:'맑은 고딕', '맑은고딕',Nanum Gothic, NanumGothic, '나눔고딕', '나눔 고딕', 'Nanum Gothic', 'NanumGothic', Dotum, '돋움', Gulim, '굴림',sans-serif;}
  329. body{font-size:12px; word-break:break-all;-ms-word-break:break-all;}
  330. a, address, blockquote, br, fieldset, legend, label, form, input, select, textarea, button, table, th, td caption, cite, code, dl, dt, dd, h1, h2, h3, h4, h5, h6, p, div, iframe, ul, ol, li, hr, form, img{margin:0; padding:0;}
  331. h1, h2, h3, h4, h5, h6 {font-size:12px; text-align:left;}
  332. ul, ol, li {list-style:none;}
  333. abbr,acronym {border:0;}
  334. img{vertical-align:middle; border:none;}
  335. img, fieldset{border:none;}
  336. iframe{border-style: none;
  337. border-color: inherit;
  338. border-width: 0;}
  339. em, address{font-style:normal;}
  340. textarea{overflow:auto;}
  341. table{border-collapse:collapse; border-spacing:0;}
  342. input, select, textarea{font-size:100%; vertical-align:middle; box-sizing:border-box;}
  343. /* Hyper Link */
  344. a,
  345. a:link,
  346. a:visited{text-decoration:none !important;}
  347. a:active,
  348. a:hover{text-decoration:none !important;}
  349. /* Hidden Content */
  350. .skip{font-size: 1px; height: 1px; line-height: 1px; overflow: hidden; position: absolute; text-indent: 4px; white-space: nowrap; width: 1px;}
  351. /* hr , legend , caption */
  352. hr, legend, caption{clear:both; display:none; list-style:none; position:absolute; top:0; left:0; width:0; height:0; margin:0; padding:0; border:0; background:none; font-size:0px; line-height:0; visibility:hidden;}
  353. /* Png IE6 */
  354. * html .png24{tmp:expression(setPng24(this));}
  355. /* fix */
  356. .fix{*zoom:1;}
  357. .fix:after{content:""; clear:both; display:block;}
  358. /* Lang Exchange */
  359. .en{ime-mode:disabled; }
  360. .kr{ime-mode:active; }
  361. /* Cursor */
  362. .hand{cursor:pointer;}
  363. /* float */
  364. .fl{float:left;}
  365. .fr{float:right;}
  366. .clear{clear:both;}
  367. /* margin */
  368. .mgt5{margin-top:5px !important;}
  369. .mgt10{margin-top:10px !important;}
  370. .mgt15{margin-top:15px !important;}
  371. .mgt20{margin-top:20px !important;}
  372. .mgt25{margin-top:25px !important;}
  373. .mgt30{margin-top:30px !important;}
  374. .mgt35{margin-top:35px !important;}
  375. .mgt40{margin-top:40px !important;}
  376. .mgt45{margin-top:45px !important;}
  377. .mgt50{margin-top:50px !important;}
  378. .mgt55{margin-top:55px !important;}
  379. .mgt60{margin-top:60px !important;}
  380. .mgt70{margin-top:70px !important;}
  381. .mgt90{margin-top:90px !important;}
  382. .mgb5{margin-bottom:5px !important;}
  383. .mgb7{margin-bottom:7px !important;}
  384. .mgb10{margin-bottom:10px !important;}
  385. .mgb14{margin-bottom:14px !important;}
  386. .mgb15{margin-bottom:15px !important;}
  387. .mgb17{margin-bottom:17px !important;}
  388. .mgb20{margin-bottom:20px !important;}
  389. .mgb25{margin-bottom:25px !important;}
  390. .mgb30{margin-bottom:30px !important;}
  391. .mgb35{margin-bottom:35px !important;}
  392. .mgb40{margin-bottom:40px !important;}
  393. .mgb45{margin-bottom:45px !important;}
  394. .mgb50{margin-bottom:50px !important;}
  395. .mgb55{margin-bottom:55px !important;}
  396. .mgb60{margin-bottom:60px !important;}
  397. .mgb65{margin-bottom:65px !important;}
  398. .mgb80{margin-bottom:80px !important;}
  399. .mgb90{margin-bottom:90px !important;}
  400. .mgl5{margin-left:5px !important;}
  401. .mgl10{margin-left:10px !important;}
  402. .mgl15{margin-left:15px !important;}
  403. .mgl20{margin-left:20px !important;}
  404. .mgl25{margin-left:25px !important;}
  405. .mgl30{margin-left:30px !important;}
  406. .mgl35{margin-left:35px !important;}
  407. .mgl40{margin-left:40px !important;}
  408. .mgl45{margin-left:45px !important;}
  409. .mgl50{margin-left:50px !important;}
  410. .mgl55{margin-left:55px !important;}
  411. .mgl60{margin-left:60px !important;}
  412. .mgr5{margin-right:5px !important;}
  413. .mgr10{margin-right:10px !important;}
  414. .mgr15{margin-right:15px !important;}
  415. .mgr20{margin-right:20px !important;}
  416. .mgr25{margin-right:25px !important;}
  417. .mgr30{margin-right:30px !important;}
  418. .mgr35{margin-right:35px !important;}
  419. .mgr40{margin-right:40px !important;}
  420. .mgr45{margin-right:45px !important;}
  421. .mgr50{margin-right:50px !important;}
  422. .mgr55{margin-right:55px !important;}
  423. .mgr60{margin-right:60px !important;}
  424. .center{text-align:center !important;}
  425. .left{text-align:left !important;}
  426. .right{text-align:right !important;}
  427. /*색상 바꾸기*/
  428. .color_bg{text-align:center; position:absolute; top:3px; right:20px; padding:0 !important; margin:0 !important;}
  429. .color_bg li{margin:3px; display:inline-block; width:15px; height:15px;}
  430. .color_bg li a{padding:0 !important; display:inline-block; width:15px; height:15px !important; border-radius:5px; border:1px solid #fff;}
  431. .color_bg .blue{background:#306BBB !important;}
  432. .color_bg .green{background:#189922 !important;}
  433. .color_bg .mint{background:#26cd99 !important;}
  434. .color_bg .orange{background:#ff9900 !important;}
  435. .color_bg .violet{background:#5b39b1 !important;}
  436. /* Lay out */
  437. body,html{background:#fff;}
  438. .body_wrap{width:690px; margin:15px auto 0;}
  439. .wrap{width:690px; margin:0 auto; margin-bottom:30px;}
  440. .header{padding:0px 14px; margin-bottom:15px; background:#4468b8; border-radius:6px 6px 0 0;}
  441. .header > div{height:39px; padding:0 27px 0 22px;}
  442. .header h1{font-size:18px; font-weight:700; float:left; font-style:italic; color:#fff; line-height:39px; }
  443. .header .date{float:right; margin-top:15px; font-size:13px; color:#fff; font-style:italic;}
  444. .header .date strong{font-size:13px; font-weight:400;}
  445. .container{}
  446. .cntInfo{border:1px solid #ccc; padding:15px 17px; margin-bottom:17px;
  447. background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEQ3NjNGRkI5MDVBMTFFNjlGMTBEMjIzNEI3QzM5MUQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEQ3NjNGRkM5MDVBMTFFNjlGMTBEMjIzNEI3QzM5MUQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0RDc2M0ZGOTkwNUExMUU2OUYxMEQyMjM0QjdDMzkxRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0RDc2M0ZGQTkwNUExMUU2OUYxMEQyMjM0QjdDMzkxRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjNS/L0AAABFSURBVHjaYvz//z8DJYCJgULAAmOEVl4HO2V1uyYjKWyKXcBItTAAOQnmLGLYVAtE+nqBJumA9l6geVKmjRfomhsBAgwA7ipWg1/hAMUAAAAASUVORK5CYII=') no-repeat 0 0;}
  448. .cntInfo .cnt{margin-bottom:13px; font-size:16px; font-weight:600; font-style:italic;}
  449. .cntInfo .cnt span{color:#666;}
  450. .main_content{background:#fff; border:1px solid #ccc; border-top:3px solid #4892d2; margin-bottom:17px; letter-spacing:-1px; border-radius:6px;}
  451. .main_content p{color:#333;}
  452. .main_content div { padding:15px 17px;}
  453. .main_content li
  454. { background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpijI+PV2FgYJgJxGxAXMwCJLqA2IkBApYyAQlOBgRgBqmoBGJRIOYB4lyAAAMA1KgE45THCrwAAAAASUVORK5CYII=) no-repeat 0 5px;
  455. font-size:13px; padding-left:10px; margin: 5px; color:#222;}
  456. .main_content div div { font-size:12px; color:#666; white-space:pre-wrap; word-break:break-all;}
  457. .main_content h3{font-size:13px; font-weight:600; margin-bottom:5px; color:#333;}
  458. .main_content h2{padding:0 17px 0 32px; height:37px; line-height:37px; border-bottom:1px solid #ccc; margin-bottom:0;
  459. background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzE5ODQ1QTk5MDY0MTFFNkIxNTJCQjM0ODkyRkQ4QzMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzE5ODQ1QUE5MDY0MTFFNkIxNTJCQjM0ODkyRkQ4QzMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMTk4NDVBNzkwNjQxMUU2QjE1MkJCMzQ4OTJGRDhDMyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMTk4NDVBODkwNjQxMUU2QjE1MkJCMzQ4OTJGRDhDMyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqL9Ap8AAAA1SURBVHjaYhQJWfufAQperw5ilKtigPOZGPAAvJKM////xy0pW4mQfdTGwCgauo4KdgIEGABVSQ6xMsdZ1AAAAABJRU5ErkJggg==') no-repeat 18px 50%;}
  460. .contents_table { width:100%;}
  461. .contents_table th{font-size:13px; color:#4892d2; font-weight:600; border:1px solid #e7eaec; background:#fcfcfc; padding:6px 10px; }
  462. .contents_table td{font-size:12px; color:#666; border:1px solid #e7eaec; padding:6px;}
  463. .contents_table1{width:100%; margin-top :5px; }
  464. .contents_table1 th{font-size:13px; color:#4892d2; font-weight:600; border:1px solid #e7eaec; border-bottom:2px solid #e7eaec; background:#fcfcfc; padding:6px 6px; }
  465. .contents_table1 td{font-size:12px; color:#666; border:1px solid #e7eaec;padding:6px 10px;}
  466. .expender{cursor:pointer;}
  467. .cnt{font-size:14px; font-weight:700; padding:0 2px 0 0; margin-bottom:6px;}
  468. .cnt img{float:right; margin-top:15px;}
  469. .listWrap{}
  470. .listWrap li{margin-top:5px; color:#666;}
  471. .listWrap li:fisrt-child{margin-top:0;}
  472. .patientInfo{text-align:center; margin-bottom:13px; background:#fcf8e3; height:60px; line-height:30px; border:1px solid #e2e7eb;}
  473. .patientInfo li{display:inline-block; zoom:1; *display:inline; margin-left:60px; font-size:13px; letter-spacing:0; color:#333;}
  474. .patientInfo li:first-child{margin-left:0;}
  475. .patientInfo li.name{font-weight:600;}
  476. .top{position:fixed; top:500px; left:500px;}
  477. .td_left{text-align:left !important;}
  478. <!-- 16.07.05 추가 -->
  479. <!-- PACS 버튼 생성관련 -->
  480. </xsl:text>
  481. </style>
  482. </xsl:template>
  483. <!-- ## Body ##-->
  484. <!-- Choose Body -->
  485. <xsl:template name="chooseBody">
  486. <xsl:choose>
  487. <xsl:when test="$isBppc='1'">
  488. <xsl:call-template name="BPPC"/>
  489. </xsl:when>
  490. <xsl:when test="$isBppc='2'">
  491. <xsl:call-template name="WITHDRAWAL"/>
  492. </xsl:when>
  493. <xsl:otherwise>
  494. <body>
  495. <xsl:call-template name="asisLayout"/>
  496. </body>
  497. </xsl:otherwise>
  498. </xsl:choose>
  499. </xsl:template>
  500. <!-- AS-IS Layout(기존레이아웃) -->
  501. <xsl:template name="asisLayout">
  502. <!-- body_wrap -->
  503. <div class="body_wrap">
  504. <!-- wrap -->
  505. <div class="wrap">
  506. <!-- title -->
  507. <xsl:call-template name="header-fix"/>
  508. <!-- /title -->
  509. <!-- container -->
  510. <!-- top content -->
  511. <div class="container fix">
  512. <div class="cntInfo">
  513. <!--수신자 정보-->
  514. <xsl:call-template name="informationRecipient_custom"/>
  515. <!--<xsl:call-template name="addComment"/>-->
  516. <!-- 환자 정보-->
  517. <xsl:call-template name="recordTarget_custom"/>
  518. <!-- 요양기관 정보 ( 생성기관 / 수신기관 ) -->
  519. <xsl:call-template name="organization_information"/>
  520. </div>
  521. <!-- /top content -->
  522. <!-- body -->
  523. <!-- content -->
  524. <div class="contents">
  525. <xsl:apply-templates select="n1:component/n1:structuredBody|n1:component/n1:nonXMLBody"/>
  526. </div>
  527. </div>
  528. <!-- /container -->
  529. </div>
  530. <!-- wrap -->
  531. </div>
  532. <!-- /body_wrap -->
  533. </xsl:template>
  534. <!-- ##################### AS-IS Header ##################### -->
  535. <!-- header - fix -->
  536. <xsl:template name="header-fix">
  537. <div class="header">
  538. <div class="fix">
  539. <h1>
  540. <xsl:value-of select="$title"/>
  541. </h1>
  542. <p class="date">
  543. 작성일
  544. <strong>
  545. <xsl:call-template name="getDate2">
  546. <xsl:with-param name="date" select="/n1:ClinicalDocument/n1:effectiveTime"/>
  547. </xsl:call-template>
  548. </strong>
  549. <br/>
  550. </p>
  551. </div>
  552. </div>
  553. </xsl:template>
  554. <!-- informantionRecipient-custom -->
  555. <xsl:template name="informationRecipient_custom">
  556. <xsl:if test="count(/n1:ClinicalDocument/n1:informationRecipient) &gt; 0">
  557. <div>
  558. <h3 class="cnt">
  559. <xsl:value-of select="/n1:ClinicalDocument/n1:informationRecipient/n1:intendedRecipient/n1:receivedOrganization/n1:asOrganizationPartOf/n1:wholeOrganization/n1:name"/>&#160;
  560. <span>
  561. <xsl:call-template name="show-name-kr">
  562. <xsl:with-param name="name" select="/n1:ClinicalDocument/n1:informationRecipient/n1:intendedRecipient/n1:informationRecipient/n1:name"/>
  563. </xsl:call-template> 선생님 귀하
  564. </span>
  565. <xsl:choose>
  566. <xsl:when test="/n1:ClinicalDocument/n1:code/@code = '57133-1'">
  567. <span style="float: right; font-size: 12px; font-style: normal;">
  568. 의뢰번호 : <xsl:value-of select="/n1:ClinicalDocument/n1:id/@extension"/>
  569. </span>
  570. </xsl:when>
  571. <xsl:when test="/n1:ClinicalDocument/n1:code/@code = '18761-7'">
  572. <span style="float: right; font-size: 12px; font-style: normal;">
  573. 회송번호 : <xsl:value-of select="/n1:ClinicalDocument/n1:id/@extension"/>
  574. </span>
  575. </xsl:when>
  576. <xsl:otherwise></xsl:otherwise>
  577. </xsl:choose>
  578. </h3>
  579. </div>
  580. </xsl:if>
  581. </xsl:template>
  582. <!-- recordTarget custom -->
  583. <xsl:template name="recordTarget_custom">
  584. <div>
  585. <ul class="patientInfo">
  586. <li class="name">
  587. <xsl:call-template name="show-name-kr">
  588. <xsl:with-param name="name" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:name"/>
  589. </xsl:call-template> / <xsl:call-template name="show-gender-kr">
  590. <xsl:with-param name="gender" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:administrativeGenderCode"/>
  591. </xsl:call-template>
  592. </li>
  593. <li class="birth">
  594. Birth. <xsl:call-template name="getDate">
  595. <xsl:with-param name="date" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:birthTime"/>
  596. </xsl:call-template>
  597. </li>
  598. <li class="tel">
  599. <!--Tel. <xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:telecom/@value"/>-->
  600. <xsl:call-template name="show-telecom-kr">
  601. <xsl:with-param name="telecom" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:telecom"/>
  602. </xsl:call-template>
  603. </li>
  604. <br></br>
  605. <li class="addr" style="margin-left: 0px;">
  606. Addr.&#160;
  607. <xsl:call-template name="show-address-kr">
  608. <xsl:with-param name="address" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr"/>
  609. </xsl:call-template>
  610. </li>
  611. </ul>
  612. </div>
  613. </xsl:template>
  614. <!-- organization_information -->
  615. <xsl:template name="organization_information">
  616. <table class="contents_table">
  617. <colgroup>
  618. <col width="20%" />
  619. <col width="20%" />
  620. <col width="15%" />
  621. <col width="45%" />
  622. </colgroup>
  623. <tbody>
  624. <tr>
  625. <xsl:choose>
  626. <xsl:when test="/n1:ClinicalDocument/n1:code/@code = '57133-1'">
  627. <th>의뢰병원</th>
  628. </xsl:when>
  629. <xsl:when test="/n1:ClinicalDocument/n1:code/@code = '11488-4'">
  630. <th>회신병원</th>
  631. </xsl:when>
  632. <xsl:when test="/n1:ClinicalDocument/n1:code/@code = '18761-7'">
  633. <th>회송병원</th>
  634. </xsl:when>
  635. <xsl:otherwise>
  636. <th>요양기관</th>
  637. </xsl:otherwise>
  638. </xsl:choose>
  639. <td style="text-align:center">
  640. <xsl:value-of select="/n1:ClinicalDocument/n1:custodian/n1:assignedCustodian/n1:representedCustodianOrganization/n1:name"/>
  641. </td>
  642. <td style="text-align: center;">
  643. <xsl:call-template name="show-name-kr">
  644. <xsl:with-param name="name" select="/n1:ClinicalDocument/n1:author/n1:assignedAuthor/n1:assignedPerson/n1:name"/>
  645. </xsl:call-template>
  646. </td>
  647. <td>
  648. <xsl:call-template name="show-address-kr">
  649. <xsl:with-param name="address" select="/n1:ClinicalDocument/n1:custodian/n1:assignedCustodian/n1:representedCustodianOrganization/n1:addr"/>
  650. </xsl:call-template>
  651. </td>
  652. </tr>
  653. <xsl:if test="count(/n1:ClinicalDocument/n1:informationRecipient) &gt; 0">
  654. <tr>
  655. <th>협진병원</th>
  656. <td style="text-align:center">
  657. <xsl:value-of select="/n1:ClinicalDocument/n1:informationRecipient/n1:intendedRecipient/n1:receivedOrganization/n1:asOrganizationPartOf/n1:wholeOrganization/n1:name"/>
  658. </td>
  659. <td style="text-align: center;">
  660. <xsl:call-template name="show-name-kr">
  661. <xsl:with-param name="name" select="/n1:ClinicalDocument/n1:informationRecipient/n1:intendedRecipient/n1:informationRecipient/n1:name"/>
  662. </xsl:call-template>
  663. </td>
  664. <td>
  665. <xsl:call-template name="show-address-kr">
  666. <xsl:with-param name="address" select="/n1:ClinicalDocument/n1:informationRecipient/n1:intendedRecipient/n1:receivedOrganization/n1:asOrganizationPartOf/n1:wholeOrganization/n1:addr"/>
  667. </xsl:call-template>
  668. </td>
  669. </tr>
  670. </xsl:if>
  671. </tbody>
  672. </table>
  673. </xsl:template>
  674. <!-- ##################### AS-IS Header ##################### -->
  675. <!-- ########################################################### -->
  676. <!-- ##################### Narrative Block ##################### -->
  677. <!-- ########################################################### -->
  678. <!-- show StructuredBody -->
  679. <xsl:template match="n1:component/n1:structuredBody">
  680. <xsl:for-each select="n1:component/n1:section">
  681. <xsl:call-template name="section"/>
  682. </xsl:for-each>
  683. </xsl:template>
  684. <!-- Section -->
  685. <xsl:template name="section">
  686. <div class="main_content">
  687. <h2 class="content_title1 cnt">
  688. <xsl:call-template name="section-title">
  689. <xsl:with-param name="title" select="n1:title"/>
  690. </xsl:call-template>
  691. <span class="expender" onclick="javascript: Expend(this);">
  692. <img src="data:image/gif;base64,R0lGODlhDQAIAIABAGZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4zLWMwMTEgNjYuMTQ1NjYxLCAyMDEyLzAyLzA2LTE0OjU2OjI3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M2IChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCQjRBQUMxQzM3NTUxMUU2OTcxNUQ5MkMyMDQwMjgxMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCQjRBQUMxRDM3NTUxMUU2OTcxNUQ5MkMyMDQwMjgxMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkJCNEFBQzFBMzc1NTExRTY5NzE1RDkyQzIwNDAyODExIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkJCNEFBQzFCMzc1NTExRTY5NzE1RDkyQzIwNDAyODExIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAQAsAAAAAA0ACAAAAhIEgpnGuhaakhEieiF+e1o3gQUAOw==" alt="" />
  693. </span>
  694. </h2>
  695. <xsl:call-template name="section-text"/>
  696. <xsl:for-each select="n1:component/n1:section">
  697. <xsl:call-template name="nestedSection">
  698. <xsl:with-param name="margin" select="2"/>
  699. </xsl:call-template>
  700. </xsl:for-each>
  701. </div>
  702. </xsl:template>
  703. <!-- section title-->
  704. <xsl:template name="section-title">
  705. <xsl:param name="title"/>
  706. <xsl:value-of select="$title"/>
  707. </xsl:template>
  708. <!-- section title-link-->
  709. <xsl:template name="section-title-Link">
  710. <xsl:param name="title"/>
  711. <xsl:choose>
  712. <xsl:when test="count(/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component[n1:section]) &gt; 1">
  713. <a name="{generate-id($title)}" href="#toc" style="color:#222;">
  714. <xsl:value-of select="$title"/>
  715. </a>
  716. </xsl:when>
  717. <xsl:otherwise>
  718. <xsl:value-of select="$title"/>
  719. </xsl:otherwise>
  720. </xsl:choose>
  721. </xsl:template>
  722. <!-- section author -->
  723. <!-- top-level section Text -->
  724. <xsl:template name="section-text">
  725. <div>
  726. <xsl:apply-templates select="n1:text"/>
  727. </div>
  728. <!--<div class ="main_content">
  729. <div>
  730. <xsl:apply-templates select="n1:text"/>
  731. </div>
  732. </div>-->
  733. </xsl:template>
  734. <!-- nested component/section -->
  735. <xsl:template name="nestedSection">
  736. <xsl:param name="margin"/>
  737. <h4 style="margin-left : {$margin}em;">
  738. <xsl:value-of select="n1:title"/>
  739. </h4>
  740. <div style="margin-left : {$margin}em;">
  741. <xsl:apply-templates select="n1:text"/>
  742. </div>
  743. <xsl:for-each select="n1:component/n1:section">
  744. <xsl:call-template name="nestedSection">
  745. <xsl:with-param name="margin" select="2*$margin"/>
  746. </xsl:call-template>
  747. </xsl:for-each>
  748. </xsl:template>
  749. <!-- paragraph -->
  750. <xsl:template match="n1:paragraph">
  751. <p>
  752. <xsl:apply-templates/>
  753. </p>
  754. </xsl:template>
  755. <!-- pre format -->
  756. <xsl:template match="n1:pre">
  757. <pre>
  758. <xsl:apply-templates/>
  759. </pre>
  760. </xsl:template>
  761. <!-- Content w/ deleted text is hidden -->
  762. <xsl:template match="n1:content[@revised='delete']"/>
  763. <!-- content -->
  764. <xsl:template match="n1:content">
  765. <span>
  766. <xsl:apply-templates select="@styleCode"/>
  767. <xsl:apply-templates/>
  768. </span>
  769. </xsl:template>
  770. <!-- line break -->
  771. <xsl:template match="n1:br">
  772. <xsl:element name='br'>
  773. <xsl:apply-templates/>
  774. </xsl:element>
  775. </xsl:template>
  776. <!-- list -->
  777. <xsl:template match="n1:list">
  778. <xsl:if test="n1:caption">
  779. <p>
  780. <strong>
  781. <xsl:apply-templates select="n1:caption"/>
  782. </strong>
  783. </p>
  784. </xsl:if>
  785. <ul>
  786. <xsl:for-each select="n1:item">
  787. <li>
  788. <xsl:apply-templates/>
  789. </li>
  790. </xsl:for-each>
  791. </ul>
  792. </xsl:template>
  793. <xsl:template match="n1:list[@listType='ordered']">
  794. <xsl:if test="n1:caption">
  795. <span style="font-weight:bold; ">
  796. <xsl:apply-templates select="n1:caption"/>
  797. </span>
  798. </xsl:if>
  799. <ol>
  800. <xsl:for-each select="n1:item">
  801. <li>
  802. <xsl:apply-templates/>
  803. </li>
  804. </xsl:for-each>
  805. </ol>
  806. </xsl:template>
  807. <!-- caption -->
  808. <xsl:template match="n1:caption">
  809. <xsl:apply-templates/>
  810. <xsl:text>: </xsl:text>
  811. </xsl:template>
  812. <!-- Tables -->
  813. <xsl:variable name="table-elem-attrs">
  814. <in:tableElems>
  815. <in:elem name="table">
  816. <in:attr name="ID"/>
  817. <in:attr name="language"/>
  818. <in:attr name="styleCode"/>
  819. <in:attr name="summary"/>
  820. <in:attr name="width"/>
  821. <in:attr name="border"/>
  822. <in:attr name="frame"/>
  823. <in:attr name="rules"/>
  824. <in:attr name="cellspacing"/>
  825. <in:attr name="cellpadding"/>
  826. </in:elem>
  827. <in:elem name="thead">
  828. <in:attr name="ID"/>
  829. <in:attr name="language"/>
  830. <in:attr name="styleCode"/>
  831. <in:attr name="align"/>
  832. <in:attr name="char"/>
  833. <in:attr name="charoff"/>
  834. <in:attr name="valign"/>
  835. </in:elem>
  836. <in:elem name="tfoot">
  837. <in:attr name="ID"/>
  838. <in:attr name="language"/>
  839. <in:attr name="styleCode"/>
  840. <in:attr name="align"/>
  841. <in:attr name="char"/>
  842. <in:attr name="charoff"/>
  843. <in:attr name="valign"/>
  844. </in:elem>
  845. <in:elem name="tbody">
  846. <in:attr name="ID"/>
  847. <in:attr name="language"/>
  848. <in:attr name="styleCode"/>
  849. <in:attr name="align"/>
  850. <in:attr name="char"/>
  851. <in:attr name="charoff"/>
  852. <in:attr name="valign"/>
  853. </in:elem>
  854. <in:elem name="colgroup">
  855. <in:attr name="ID"/>
  856. <in:attr name="language"/>
  857. <in:attr name="styleCode"/>
  858. <in:attr name="span"/>
  859. <in:attr name="width"/>
  860. <in:attr name="align"/>
  861. <in:attr name="char"/>
  862. <in:attr name="charoff"/>
  863. <in:attr name="valign"/>
  864. </in:elem>
  865. <in:elem name="col">
  866. <in:attr name="ID"/>
  867. <in:attr name="language"/>
  868. <in:attr name="styleCode"/>
  869. <in:attr name="span"/>
  870. <in:attr name="width"/>
  871. <in:attr name="align"/>
  872. <in:attr name="char"/>
  873. <in:attr name="charoff"/>
  874. <in:attr name="valign"/>
  875. </in:elem>
  876. <in:elem name="tr">
  877. <in:attr name="ID"/>
  878. <in:attr name="language"/>
  879. <in:attr name="styleCode"/>
  880. <in:attr name="align"/>
  881. <in:attr name="char"/>
  882. <in:attr name="charoff"/>
  883. <in:attr name="valign"/>
  884. </in:elem>
  885. <in:elem name="th">
  886. <in:attr name="ID"/>
  887. <in:attr name="language"/>
  888. <in:attr name="styleCode"/>
  889. <in:attr name="abbr"/>
  890. <in:attr name="axis"/>
  891. <in:attr name="headers"/>
  892. <in:attr name="scope"/>
  893. <in:attr name="rowspan"/>
  894. <in:attr name="colspan"/>
  895. <in:attr name="align"/>
  896. <in:attr name="char"/>
  897. <in:attr name="charoff"/>
  898. <in:attr name="valign"/>
  899. </in:elem>
  900. <in:elem name="td">
  901. <in:attr name="ID"/>
  902. <in:attr name="language"/>
  903. <in:attr name="styleCode"/>
  904. <in:attr name="abbr"/>
  905. <in:attr name="axis"/>
  906. <in:attr name="headers"/>
  907. <in:attr name="scope"/>
  908. <in:attr name="rowspan"/>
  909. <in:attr name="colspan"/>
  910. <in:attr name="align"/>
  911. <in:attr name="char"/>
  912. <in:attr name="charoff"/>
  913. <in:attr name="valign"/>
  914. </in:elem>
  915. </in:tableElems>
  916. </xsl:variable>
  917. <xsl:template name="output-attrs">
  918. <xsl:variable name="elem-name" select="local-name(.)"/>
  919. <xsl:for-each select="@*">
  920. <xsl:variable name="attr-name" select="local-name(.)"/>
  921. <xsl:variable name="source" select="."/>
  922. <xsl:variable name="lcSource" select="translate($source, $uc, $lc)"/>
  923. <xsl:variable name="scrubbedSource" select="translate($source, $simple-sanitizer-match, $simple-sanitizer-replace)"/>
  924. <xsl:choose>
  925. <xsl:when test="contains($lcSource,'javascript')">
  926. <p>
  927. <xsl:value-of select="$javascript-injection-warning"/>
  928. </p>
  929. <xsl:message terminate="yes">
  930. <xsl:value-of select="$javascript-injection-warning"/>
  931. </xsl:message>
  932. </xsl:when>
  933. <xsl:when test="$attr-name='styleCode'">
  934. <xsl:apply-templates select="."/>
  935. </xsl:when>
  936. <!--<xsl:when test="not(document('')/xsl:stylesheet/xsl:variable[@name='table-elem-attrs']/in:tableElems/in:elem[@name=$elem-name]/in:attr[@name=$attr-name])">
  937. <xsl:message>
  938. <xsl:value-of select="$attr-name"/> is not legal in <xsl:value-of select="$elem-name"/>
  939. </xsl:message>
  940. </xsl:when>-->
  941. <xsl:when test="not($source = $scrubbedSource)">
  942. <p>
  943. <xsl:value-of select="$malicious-content-warning"/>
  944. </p>
  945. <xsl:message>
  946. <xsl:value-of select="$malicious-content-warning"/>
  947. </xsl:message>
  948. </xsl:when>
  949. <xsl:otherwise>
  950. <xsl:copy-of select="."/>
  951. </xsl:otherwise>
  952. </xsl:choose>
  953. </xsl:for-each>
  954. </xsl:template>
  955. <!-- 16. 06 .22 추가-->
  956. <xsl:template match="n1:table">
  957. <xsl:element name="{local-name()}">
  958. <xsl:attribute name="class">contents_table1</xsl:attribute>
  959. <xsl:call-template name="output-attrs"/>
  960. <xsl:apply-templates/>
  961. </xsl:element>
  962. </xsl:template>
  963. <xsl:template match="n1:thead | n1:tfoot | n1:tbody | n1:colgroup | n1:col | n1:tr | n1:th | n1:td">
  964. <xsl:element name="{local-name()}">
  965. <xsl:call-template name="output-attrs"/>
  966. <xsl:apply-templates/>
  967. </xsl:element>
  968. </xsl:template>
  969. <xsl:template match="n1:table/n1:caption">
  970. <span style="font-weight:bold; ">
  971. <xsl:apply-templates/>
  972. </span>
  973. </xsl:template>
  974. <!-- RenderMultiMedia -->
  975. <!-- Stylecode -->
  976. <xsl:template match="//n1:*[@styleCode]">
  977. <xsl:if test="@styleCode='Bold'">
  978. <b>
  979. <xsl:apply-templates/>
  980. </b>
  981. </xsl:if>
  982. <xsl:if test="@styleCode='Italics'">
  983. <xsl:element name="i">
  984. <xsl:apply-templates/>
  985. </xsl:element>
  986. </xsl:if>
  987. <xsl:if test="@styleCode='Underline'">
  988. <xsl:element name="u">
  989. <xsl:apply-templates/>
  990. </xsl:element>
  991. </xsl:if>
  992. <xsl:if test="contains(@styleCode,'Bold') and contains(@styleCode,'Italics') and not (contains(@styleCode, 'Underline'))">
  993. <xsl:element name="b">
  994. <xsl:element name="i">
  995. <xsl:apply-templates/>
  996. </xsl:element>
  997. </xsl:element>
  998. </xsl:if>
  999. <xsl:if test="contains(@styleCode,'Bold') and contains(@styleCode,'Underline') and not (contains(@styleCode, 'Italics'))">
  1000. <xsl:element name="b">
  1001. <xsl:element name="u">
  1002. <xsl:apply-templates/>
  1003. </xsl:element>
  1004. </xsl:element>
  1005. </xsl:if>
  1006. <xsl:if test="contains(@styleCode,'Italics') and contains(@styleCode,'Underline') and not (contains(@styleCode, 'Bold'))">
  1007. <xsl:element name="i">
  1008. <xsl:element name="u">
  1009. <xsl:apply-templates/>
  1010. </xsl:element>
  1011. </xsl:element>
  1012. </xsl:if>
  1013. <xsl:if test="contains(@styleCode,'Italics') and contains(@styleCode,'Underline') and contains(@styleCode, 'Bold')">
  1014. <xsl:element name="b">
  1015. <xsl:element name="i">
  1016. <xsl:element name="u">
  1017. <xsl:apply-templates/>
  1018. </xsl:element>
  1019. </xsl:element>
  1020. </xsl:element>
  1021. </xsl:if>
  1022. <xsl:if test="not (contains(@styleCode,'Italics') or contains(@styleCode,'Underline') or contains(@styleCode, 'Bold'))">
  1023. <xsl:apply-templates/>
  1024. </xsl:if>
  1025. </xsl:template>
  1026. <!-- Superscript or Subscript -->
  1027. <xsl:template match="n1:sup">
  1028. <xsl:element name="sup">
  1029. <xsl:apply-templates/>
  1030. </xsl:element>
  1031. </xsl:template>
  1032. <xsl:template match="n1:sub">
  1033. <xsl:element name="sub">
  1034. <xsl:apply-templates/>
  1035. </xsl:element>
  1036. </xsl:template>
  1037. <!-- linkHtml -->
  1038. <xsl:template match="n1:linkHtml">
  1039. <xsl:choose>
  1040. <!-- 06.28 PACS ICON 관련 부분 추가-->
  1041. <xsl:when test="contains(./@ID, 'PACS')">
  1042. <xsl:call-template name="addPacsIcon">
  1043. <xsl:with-param name="href" select="./@href"/>
  1044. </xsl:call-template>
  1045. </xsl:when>
  1046. <xsl:otherwise>
  1047. <xsl:variable name="linkTargetContainsJavaScript">
  1048. <xsl:call-template name="containsJavaScript">
  1049. <xsl:with-param name="reference" select="./@href"></xsl:with-param>
  1050. </xsl:call-template>
  1051. </xsl:variable>
  1052. <xsl:if test="$linkTargetContainsJavaScript != 'true'">
  1053. <xsl:if test="string-length(./@href) &gt; 0 or string-length(./text()) &gt; 0">
  1054. <xsl:variable name="linkText">
  1055. <xsl:choose>
  1056. <xsl:when test="string-length(./text()) &gt; 0">
  1057. <xsl:value-of select="./text()"/>
  1058. </xsl:when>
  1059. <xsl:otherwise>
  1060. <xsl:value-of select="concat('link:',./@href)"/>
  1061. </xsl:otherwise>
  1062. </xsl:choose>
  1063. </xsl:variable>
  1064. <xsl:variable name="linkTarget">
  1065. <xsl:choose>
  1066. <xsl:when test="string-length(./@href) &gt; 1 and starts-with(./@href, '#')">
  1067. <xsl:variable name="referenceId" select="substring-after(./@href, '#')"/>
  1068. <xsl:variable name="attachmentReference">
  1069. <xsl:choose>
  1070. <xsl:when test="//n1:observationMedia/@ID=$referenceId">true</xsl:when>
  1071. <xsl:otherwise>false</xsl:otherwise>
  1072. </xsl:choose>
  1073. </xsl:variable>
  1074. <xsl:choose>
  1075. <xsl:when test="$attachmentReference='true'">
  1076. <xsl:if test="//n1:observationMedia/@ID=$referenceId">
  1077. <xsl:value-of select="//n1:observationMedia[@ID=$referenceId]/n1:value/n1:reference/@value"/>
  1078. </xsl:if>
  1079. </xsl:when>
  1080. <xsl:otherwise>
  1081. <xsl:value-of select="concat('#', $referenceId)"/>
  1082. </xsl:otherwise>
  1083. </xsl:choose>
  1084. </xsl:when>
  1085. <xsl:when test="not(starts-with(./@href, '#')) and string-length(./@href) &gt; 0">
  1086. <xsl:value-of select="./@href"/>
  1087. </xsl:when>
  1088. </xsl:choose>
  1089. </xsl:variable>
  1090. <xsl:choose>
  1091. <xsl:when test="string-length($linkTarget)=0">
  1092. <xsl:element name="a">
  1093. <xsl:value-of select="$linkText"/>
  1094. </xsl:element>
  1095. </xsl:when>
  1096. <xsl:otherwise>
  1097. <xsl:element name="a">
  1098. <xsl:attribute name="href">
  1099. <xsl:value-of select="$linkTarget"/>
  1100. </xsl:attribute>
  1101. <xsl:value-of select="$linkText"/>
  1102. </xsl:element>
  1103. </xsl:otherwise>
  1104. </xsl:choose>
  1105. </xsl:if>
  1106. </xsl:if>
  1107. </xsl:otherwise>
  1108. </xsl:choose>
  1109. </xsl:template>
  1110. <xsl:template name="containsJavaScript">
  1111. <xsl:param name="reference"/>
  1112. <xsl:variable name="upperCaseReference">
  1113. <xsl:call-template name="caseUp">
  1114. <xsl:with-param name="data" select="$reference"/>
  1115. </xsl:call-template>
  1116. </xsl:variable>
  1117. <xsl:choose>
  1118. <xsl:when test="contains($upperCaseReference, 'JAVASCRIPT') or contains($upperCaseReference, 'JSCRIPT')">true</xsl:when>
  1119. <xsl:otherwise>false</xsl:otherwise>
  1120. </xsl:choose>
  1121. </xsl:template>
  1122. <!-- PACS ICON-->
  1123. <xsl:template name="addPacsIcon">
  1124. <xsl:param name="href"/>
  1125. <xsl:element name="a">
  1126. <xsl:attribute name="onclick">javascript: popupViewNew('<xsl:value-of select="./@href"/>', '<xsl:value-of select="./@rev"/>', '<xsl:value-of select="$organizationOid"/>'); return false;</xsl:attribute>
  1127. <xsl:element name="img">
  1128. <xsl:attribute name="width">50</xsl:attribute>
  1129. <xsl:attribute name="height">20</xsl:attribute>
  1130. <xsl:attribute name="class">main_section_button</xsl:attribute>
  1131. <xsl:attribute name="src">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAAUCAYAAADcHS5uAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABGFJREFUeNrcV9srvGsUXjPGmd84bqfIhXM5JsSFK8QmaeeCKxHu9l/AlXLhVtnlQm7cUC6IKJKcDzkTyvkwjkVjnI39Pqver+H3zZ6pfTNZ9TXfe/zWs9aznvcdzefnJ6Wlpf3h6uo6bzabfegHmVarNb28vKSK1ysdOjQajaG0tFTr5ub2k3DS6+urvqen5+Tj4yNQJ7JZFBISYvTx8dHTDzMkLjw8/OXw8PBPZNTdyclJI1A7lJNbW1u0vr5OFxcXSp+npyfFxcWh1MjDw8OufQQ2LTAydVGnjgIUvqyurjKohoYGBibt7u6OhoeHaXp6mrKyssjd3d2u/WAK0Pf3d4cAenZ2RsHBwVRXV8d+7e/v0/39PQmxpLCwMCovL6eoqCjq7e2l1NRUm/sJgbUNtKCggJKTk5X23NwcjY+PK22MYU57eztH29pajPX19TENMzMzKTc3l/vR7u7upufnZ2Xd29sb1dbW0u3tLW1sbNDV1ZWSlb29PYqPj6ekpCQ6Pj7m9b6+vv8/o4jG2NgYzczMcJQrKys5wgcHBzweExPDIKKjo3mOtLKyMnagra2NxxF5IQrk7e3N4GV/YWEhBQYGKvvBUlJS+HdtbY0MBsMXf5BZ0NrZ2ZmD1dXVZZOJdgFFP8Bi7PT0lM7Pz9lZtIVS8zMyMkI5OTk0MTHBaxISEjgora2tyj4LCwv8CxHBHjc3N9zu7+//7ZuoSaGSdHl5qeqT0Wik7e1tZoafnx8zwB7qamUDC74/6IdI4T0iIoKBnZyccBsOgVqgM2Qc4+gPCgrifrX9dnd3eY+ioiLVcTwuLi6cOdDS2hzQWZyRXLfW5lhiUIDKjH5/MCk/P5+ampqoqqqKhoaGuDYwlp6ezjTC+/z8PGdSrpEs+P5cX19zpjGOPcEEtTleXl6cdbU9QGcosjwl1OZYPr9RV40CcGhgYIDr1NJQZ5D2mpoape/p6Ymp+PDwwNKvRkspNhAgjNfX1/P82dlZZfzo6IjFBplfXFzk+gdj4AsUWVzpOKgoJQTFXuraFCOZHUtLTEyk0dHRL2AaGxspIyODpqamGCiOh87OTnp8fKTs7OwvZx7WotbwXdDPcn8ACA0NpeLiYtxVOciSggBYUVHBwHGZQO2jD/PsEiM1MN/FSBpuJFDGlpaWL/2Tk5OsrjjQQU841NzczGOge0dHB79XV1dTSUkJv+/s7LCIWe4DNV5aWuJvoGwQJBw1oGtAQICiGcg6ggI9QNatgZUZ1Qjn/tLr9R2xsbG/HOkKiDqNjIwkf39/0ul07DBYADVGxkFt2ODgIG1ubjJYNRNnr0kE6m+HuxlZZnZlZYWpDSVGJlEGMAgSMo5jLC8vT1FYu85RR7vUSwM4CVCayWRioYIoIrOgOG5etoDei2yaHRXofwVgeXmZgYDm1vwX2DDwoMFEcSYaBA2CITTiT/iP+C8KXAiGoLlRvP+Sqpssivwf0ZEr6fwDzCySNiEw1aLxrwADAGsuee+PNkkCAAAAAElFTkSuQmCC</xsl:attribute>
  1132. </xsl:element>
  1133. </xsl:element>
  1134. </xsl:template>
  1135. <!-- BPPC Body-->
  1136. <xsl:template name="BPPC">
  1137. <body>
  1138. <!-- body_wrap -->
  1139. <div class="body_wrap">
  1140. <!-- wrap -->
  1141. <div class="wrap">
  1142. <div class="header">
  1143. <h1>
  1144. <xsl:value-of select="/n1:ClinicalDocument/n1:title"/>
  1145. </h1>
  1146. </div>
  1147. <div class="contents">
  1148. <h2>
  1149. 본인은 원활한 진료서비스 제공을 위하여 의료기관에서 작성한 본인의 개인정보 및 의무기록 등 진료정보를 타 의료기관 내원 진료 시 활용(이하 “진료정보교류서비스”라 한다)하고,
  1150. 진료정보교류서비스 평가 및 분석 자료로 활용될 수 있다는 사실에 대해 충분한 설명을 듣고 이해하였으며, 이에 아래와 같이 동의합니다.<br/>
  1151. ※ 동의서 보관방법 : 서면으로 제출한 본 동의서는 개별 의료기관에서 보관하지 않고, 전자적으로 변환하여 진료정보교류시스템(보건복지부)에서 보관합니다.
  1152. </h2>
  1153. <table class="info_agree" border="0" cellpadding="0" cellspacing="0">
  1154. <colgroup>
  1155. <col width="20%" />
  1156. <col width="20%" />
  1157. <col width="20%" />
  1158. <col width="20%" />
  1159. <col width="20%" />
  1160. </colgroup>
  1161. <tr>
  1162. <th rowspan="3">동의주체</th>
  1163. <th style="text-align: left;">성 명</th>
  1164. <td>
  1165. <xsl:call-template name="show-name-kr">
  1166. <xsl:with-param name="name" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:name"/>
  1167. </xsl:call-template>
  1168. </td>
  1169. <th style="text-align: left;">전화번호</th>
  1170. <td>
  1171. <xsl:call-template name="show-telecom-kr">
  1172. <xsl:with-param name="telecom" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:telecom"/>
  1173. </xsl:call-template>
  1174. </td>
  1175. </tr>
  1176. <tr>
  1177. <th style="text-align: left;">생년월일(주민등록번호)</th>
  1178. <td colspan="4">
  1179. <xsl:call-template name="getDate">
  1180. <xsl:with-param name="date" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:birthTime"/>
  1181. </xsl:call-template>
  1182. </td>
  1183. </tr>
  1184. <tr>
  1185. <th style="text-align: left;">주 소</th>
  1186. <td colspan="4">
  1187. <xsl:call-template name="show-address-kr">
  1188. <xsl:with-param name="address" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr"/>
  1189. </xsl:call-template>
  1190. </td>
  1191. </tr>
  1192. </table>
  1193. <table class="info_agree" border="0" cellpadding="0" cellspacing="0">
  1194. <colgroup>
  1195. <col width="20%" />
  1196. <col width="20%" />
  1197. <col width="60%" />
  1198. </colgroup>
  1199. <caption>개인정보 제공 동의서 양식</caption>
  1200. <tr>
  1201. <th rowspan="3" width="17%">제공하는 정보 항목</th>
  1202. <th style="text-align: left;">[1] 개인정보</th>
  1203. <td>성명, 연락처(법정대리인의 성명, 연락처),주소</td>
  1204. </tr>
  1205. <tr>
  1206. <th style="text-align: left;">[2] 고유식별정보</th>
  1207. <td>주민등록번호, 외국인등록번호 </td>
  1208. </tr>
  1209. <tr>
  1210. <th style="text-align: left;">
  1211. [3] 민감정보
  1212. <br />(진료정보)
  1213. </th>
  1214. <td>
  1215. ① 수진일별 처방 내용(약 처방, 검사 내역)<br />
  1216. ② 진단내용<br />
  1217. ③ 수술을 시행하는 경우 수술에 관한 내용(수술일, 수술명 등 진료기록지 등에 기재되는 일체의 수술정보)<br />
  1218. ④ 외래접수 정보(진료과, 진료의·주치의)<br />
  1219. ⑤ 입퇴원정보(입원일, 퇴원일 등 일체의 입퇴원 정보)<br />
  1220. ⑥ 예약정보(일시, 내용 등 일체의 예약정보)<br />
  1221. ⑦ 예방접종 내역 ⑧ 알레르기 및 부작용 정보<br />
  1222. ⑨ 생체신호 정보 및 흡연, 음주상태<br />
  1223. ⑩ 신고된 법정 전염성 감염병 정보<br />
  1224. ⑪ 환자상태 및 회송사유<br/>
  1225. </td>
  1226. </tr>
  1227. <tr>
  1228. <th>제공·이용의 목적</th>
  1229. <td colspan="2">
  1230. ① 진료정보교류시스템을 활용한 의료인간 진료정보 전달로 진료서비스의 원활한 제공<br />
  1231. ② 경제적·의학적 편익분석을 위하여 행해지는 진료정보교류서비스에 대한 평가·분석<br />
  1232. </td>
  1233. </tr>
  1234. <tr>
  1235. <th>제공받는 자</th>
  1236. <td colspan="2">
  1237. ① 본인이 내원하여 진료서비스를 제공받는 의료기관<br/>
  1238. (다만, 진료정보교류시스템을 사용하는 의료기관에 한정)<br/>
  1239. ② 보건복지부 (동의서관리, 진료정보교류서비스 평가자료로 한정)
  1240. </td>
  1241. </tr>
  1242. <tr>
  1243. <th>보유 및 이용기간</th>
  1244. <td colspan="2">
  1245. ① 본 동의서의 유효기간은 “진료정보교류에 관한 개인정보 제공동의(전체) 철회서” 제출 전까지입니다.<br />
  1246. ② 본인(법정대리인)이 진료정보교류에 관한 개인정보 제공동의를 철회하는 경우 개인정보보호법제36조 및 제37조에 의하여 즉시 삭제 및 처리를 정지합니다.<br />
  1247. ③ 다만 위 제①,②항에도 불구하고 법령에 의하여 의무적으로 보존이 필요한 기간 동안에는 해당 정보가 보유됩니다.<br />
  1248. </td>
  1249. </tr>
  1250. <tr>
  1251. <th>
  1252. 동의 거부 권리 및<br/>동의 거부 따른 불이익 또는 제한사항
  1253. </th>
  1254. <td colspan="2">
  1255. ① 귀하는 개인정보 제공 동의를 거부할 권리가 있습니다.<br />
  1256. ② 동의를 거부할 경우 별도의 불이익은 없으며, 다만 진료정보교류시스템을 활용하지 못함으로써 진료를 의뢰하는 경우
  1257. 진료접수 대기시간이 소요될 수 있으며 별도의 의무기록송부절차가 필요함을 알려드립니다.<br />
  1258. </td>
  1259. </tr>
  1260. <tr></tr>
  1261. <tr>
  1262. <th>동의 제외사항</th>
  1263. <th width="17%">진료과</th>
  1264. <td>
  1265. <xsl:for-each select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:templateId/@root='2.16.840.1.113883.3.445.17']/n1:text/n1:table[2]/n1:tbody/n1:tr[7]/n1:td/n1:paragraph">
  1266. <xsl:variable name="position" select="position()"/>
  1267. <xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:templateId/@root='2.16.840.1.113883.3.445.17']/n1:text/n1:table[2]/n1:tbody/n1:tr[7]/n1:td/n1:paragraph[$position]"/>
  1268. <xsl:text>&#160;</xsl:text>
  1269. </xsl:for-each>
  1270. </td>
  1271. </tr>
  1272. </table>
  1273. </div>
  1274. <div class="agreement">
  1275. <div class="">
  1276. <strong>본인(법정대리인)은 [1]개인정보의 제공·이용에 동의합니다. (필수)</strong>
  1277. <p>
  1278. <input type="radio" name="agree1" value="yes1" id="yes1" checked="checked"/>
  1279. <label for="yes1">예</label>
  1280. <input type="radio" name="agree1" value="no1" id="no1" style="pointer-events: none;"/>
  1281. <label for="no1">아니오</label>
  1282. </p>
  1283. </div>
  1284. <div class="">
  1285. <strong>본인(법정대리인)은 [2]고유식별정보(주민등록번호)의 제공·이용에 동의합니다. (필수)</strong>
  1286. <p>
  1287. <input type="radio" name="agree2" value="yes2" id="yes2" checked="checked"/>
  1288. <label for="yes2">예</label>
  1289. <input type="radio" name="agree2" value="no2" id="no2" style="pointer-events: none;"/>
  1290. <label for="no2">아니오</label>
  1291. </p>
  1292. </div>
  1293. <div class="">
  1294. <strong>본인(법정대리인)은 [3]민감(진료)정보의 제공·이용에 동의합니다. (필수)</strong>
  1295. <p>
  1296. <input type="radio" name="agree3" value="yes3" id="yes3" checked="checked"/>
  1297. <label for="yes3">예</label>
  1298. <input type="radio" name="agree3" value="no3" id="no3" style="pointer-events: none;"/>
  1299. <label for="no3">아니오</label>
  1300. </p>
  1301. </div>
  1302. </div>
  1303. <div class="contents1 fix">
  1304. <table class="chk_agree" border="0" cellpadding="0" cellspacing="0">
  1305. <colgroup>
  1306. <col width=""/>
  1307. <col width=""/>
  1308. </colgroup>
  1309. <tr>
  1310. <td>작성일자</td>
  1311. <td>
  1312. : 20
  1313. <input type="text" class="date_year" value="{substring(/n1:ClinicalDocument/n1:effectiveTime/@value,3,2)}" readonly="readonly"/> 년
  1314. <input type="text" class="date_mon" value="{substring(/n1:ClinicalDocument/n1:effectiveTime/@value,5,2)}" readonly="readonly"/> 월
  1315. <input type="text" class="date_day" value="{substring(/n1:ClinicalDocument/n1:effectiveTime/@value,7,2)}" readonly="readonly"/> 일
  1316. </td>
  1317. </tr>
  1318. <tr>
  1319. <td>환자(대리인 또는 보호자) 이름</td>
  1320. <td>
  1321. : <input type="text" class="comm_input" value="{substring-after(/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:templateId/@root='2.16.840.1.113883.3.445.17']/n1:text/n1:paragraph[@ID='personname'], ': ')}" readonly="readonly" />
  1322. </td>
  1323. <td></td>
  1324. </tr>
  1325. <tr>
  1326. <td>환자와의관계</td>
  1327. <td>
  1328. : <input type="text" class="comm_input" value="{substring-after(/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:templateId/@root='2.16.840.1.113883.3.445.17']/n1:text/n1:paragraph[@ID='relationship'], ': ')}" readonly="readonly"/>
  1329. </td>
  1330. <td></td>
  1331. </tr>
  1332. <tr>
  1333. <td>신청인(법정대리인) 연락처</td>
  1334. <td >
  1335. : <input type="text" class="comm_input" value="{substring-after(/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:templateId/@root='2.16.840.1.113883.3.445.17']/n1:text/n1:paragraph[@ID='persontelecom'], ': ')}" readonly="readonly"/>
  1336. </td>
  1337. <td></td>
  1338. </tr>
  1339. </table>
  1340. <div class="sign">
  1341. 서명 :
  1342. <br/>
  1343. <xsl:if test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section/n1:entry/n1:observationMedia/n1:entryRelationship/n1:observation[n1:templateId/@root='2.16.840.1.113883.3.445.19']/n1:value !=''">
  1344. <xsl:call-template name="show-signature">
  1345. <xsl:with-param name="signature" select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section/n1:entry/n1:observationMedia/n1:entryRelationship/n1:observation[n1:templateId/@root='2.16.840.1.113883.3.445.19']/n1:value"/>
  1346. </xsl:call-template>
  1347. </xsl:if>
  1348. </div>
  1349. </div>
  1350. </div>
  1351. <!-- /wrap -->
  1352. </div>
  1353. <!-- /body_wrap -->
  1354. </body>
  1355. </xsl:template>
  1356. <!-- WITHDRAWAL Body-->
  1357. <xsl:template name="WITHDRAWAL">
  1358. <body>
  1359. <!-- body_wrap -->
  1360. <div class="body_wrap">
  1361. <!-- wrap -->
  1362. <div class="wrap">
  1363. <div class="header">
  1364. <h1>
  1365. 진료정보교류 개인정보 제공 동의(
  1366. <xsl:choose>
  1367. <!--전체철회-->
  1368. <xsl:when test="/n1:ClinicalDocument/n1:documentationOf/n1:serviceEvent/n1:code/@code = '1.2.410.100110.40.2.2.2.4'">
  1369. <input id="chk001" type="checkbox" onclick="return false;" height="60 px;" />부분
  1370. <input id="chk002" type="checkbox" checked="checked" onclick="return false;" />전체 ) 철회서
  1371. </xsl:when>
  1372. <!--부분철회-->
  1373. <xsl:when test="/n1:ClinicalDocument/n1:documentationOf/n1:serviceEvent/n1:code/@code = '1.2.410.100110.40.2.2.2.5'">
  1374. <input id="chk001" type="checkbox" checked="checked" onclick="return false;" height="60 px;" />부분
  1375. <input id="chk002" type="checkbox" onclick="return false;" />전체 ) 철회서
  1376. </xsl:when>
  1377. <xsl:otherwise>
  1378. <input id="chk001" type="checkbox" onclick="return false;" height="60 px;" />부분
  1379. <input id="chk002" type="checkbox" onclick="return false;" />전체 ) 철회서
  1380. </xsl:otherwise>
  1381. </xsl:choose>
  1382. </h1>
  1383. </div>
  1384. <div class="contents">
  1385. <table class="info_agree" border="0" cellpadding="0" cellspacing="0">
  1386. <caption>개인정보 제공 동의 철회서 양식</caption>
  1387. <colgroup>
  1388. <col width="15%" />
  1389. <col width="15%" />
  1390. <col width="15%" />
  1391. <col width="30%" />
  1392. <col width="25%" />
  1393. </colgroup>
  1394. <tr>
  1395. <th style="text-align: center;">접수일</th>
  1396. <td>
  1397. <xsl:call-template name="getDate">
  1398. <xsl:with-param name="date" select="/n1:ClinicalDocument/n1:effectiveTime"/>
  1399. </xsl:call-template>
  1400. </td>
  1401. <th style="text-align: center;">접수기관</th>
  1402. <td>
  1403. <xsl:value-of select="/n1:ClinicalDocument/n1:custodian/n1:assignedCustodian/n1:representedCustodianOrganization/n1:name"/>
  1404. </td>
  1405. <th style="text-align: left;">
  1406. 처리기간 10일 이내<br/>
  1407. </th>
  1408. </tr>
  1409. </table>
  1410. <table class="info_agree" border="0" cellpadding="0" cellspacing="0" style="margin-top: 10px;">
  1411. <colgroup>
  1412. <col width="20%" />
  1413. <col width="20%" />
  1414. <col width="20%" />
  1415. <col width="20%" />
  1416. <col width="20%" />
  1417. </colgroup>
  1418. <!--동의주체-->
  1419. <tr>
  1420. <th rowspan="3">동의주체</th>
  1421. <th style="text-align: left;">성 명</th>
  1422. <td>
  1423. <xsl:call-template name="show-name-kr">
  1424. <xsl:with-param name="name" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:name"/>
  1425. </xsl:call-template>
  1426. </td>
  1427. <th style="text-align: left;">전화번호</th>
  1428. <td>
  1429. <xsl:call-template name="show-telecom-kr">
  1430. <xsl:with-param name="telecom" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:telecom"/>
  1431. </xsl:call-template>
  1432. </td>
  1433. </tr>
  1434. <tr>
  1435. <th style="text-align: left;">
  1436. 생년월일<br/>(주민등록번호)
  1437. </th>
  1438. <td colspan="4">
  1439. <xsl:call-template name="getDate">
  1440. <xsl:with-param name="date" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:birthTime"/>
  1441. </xsl:call-template>
  1442. </td>
  1443. </tr>
  1444. <tr>
  1445. <th style="text-align: left;">주 소</th>
  1446. <td colspan="4">
  1447. <xsl:call-template name="show-address-kr">
  1448. <xsl:with-param name="address" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr"/>
  1449. </xsl:call-template>
  1450. </td>
  1451. </tr>
  1452. <tr>
  1453. <td colspan="5"></td>
  1454. </tr>
  1455. <tr>
  1456. <th rowspan="5">철회내용</th>
  1457. <th rowspan="2">
  1458. 부분<br/> 의료기관
  1459. </th>
  1460. <th>
  1461. 의료기관명<br>(동의 철회 요구)</br>
  1462. </th>
  1463. <td colspan="2">
  1464. <xsl:for-each select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:templateId/@root='2.16.840.1.113883.3.445.17']/n1:text/n1:table[2]/n1:tbody/n1:tr[4]/n1:td[1]/n1:paragraph">
  1465. <xsl:variable name="position" select="position()"/>
  1466. <xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:templateId/@root='2.16.840.1.113883.3.445.17']/n1:text/n1:table[2]/n1:tbody/n1:tr[4]/n1:td/n1:paragraph[$position]"/>&#160;
  1467. </xsl:for-each>
  1468. </td>
  1469. </tr>
  1470. <!--10-->
  1471. <tr>
  1472. <td colspan="3">
  1473. <xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:templateId/@root='2.16.840.1.113883.3.445.17']/n1:text/n1:table[2]/n1:tbody/n1:tr[6]/n1:td[1]"/>
  1474. </td>
  1475. </tr>
  1476. <!--11-->
  1477. <tr>
  1478. <th rowspan="2">
  1479. 부분<br/> 진료과
  1480. </th>
  1481. <th>
  1482. 진료과명<br/>(동의 철회 요구)
  1483. </th>
  1484. <td colspan="2">
  1485. <xsl:for-each select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:templateId/@root='2.16.840.1.113883.3.445.17']/n1:text/n1:table[2]/n1:tbody/n1:tr[7]/n1:td/n1:paragraph">
  1486. <xsl:variable name="position" select="position()"/>
  1487. <xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:templateId/@root='2.16.840.1.113883.3.445.17']/n1:text/n1:table[2]/n1:tbody/n1:tr[7]/n1:td/n1:paragraph[$position]"/>
  1488. <xsl:text>&#160;</xsl:text>
  1489. </xsl:for-each>
  1490. </td>
  1491. </tr>
  1492. <!--12-->
  1493. <tr>
  1494. <td colspan="3">
  1495. <xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:templateId/@root='2.16.840.1.113883.3.445.17']/n1:text/n1:table[2]/n1:tbody/n1:tr[9]/n1:td[1]"/>
  1496. </td>
  1497. </tr>
  1498. <tr>
  1499. <th>전체</th>
  1500. <td colspan="3">
  1501. <xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:templateId/@root='2.16.840.1.113883.3.445.17']/n1:text/n1:table[2]/n1:tbody/n1:tr[10]/n1:td[1]"/>
  1502. </td>
  1503. </tr>
  1504. </table>
  1505. <br/>
  1506. <p>개인정보보호법 등에 따라 위와 같이 요구합니다.</p>
  1507. </div>
  1508. <div class="contents1 fix" style="margin-top: 10px;">
  1509. <table class="chk_agree" border="0" cellpadding="0" cellspacing="0">
  1510. <colgroup>
  1511. <col width=""/>
  1512. <col width=""/>
  1513. </colgroup>
  1514. <tr>
  1515. <td>작성일자</td>
  1516. <td>
  1517. : 20
  1518. <input type="text" class="date_year" value="{substring(/n1:ClinicalDocument/n1:effectiveTime/@value,3,2)}" readonly="readonly"/> 년
  1519. <input type="text" class="date_mon" value="{substring(/n1:ClinicalDocument/n1:effectiveTime/@value,5,2)}" readonly="readonly"/> 월
  1520. <input type="text" class="date_day" value="{substring(/n1:ClinicalDocument/n1:effectiveTime/@value,7,2)}" readonly="readonly"/> 일
  1521. </td>
  1522. </tr>
  1523. <tr>
  1524. <td>환자(대리인 또는 보호자) 이름</td>
  1525. <td>
  1526. : <input type="text" class="comm_input" value="{substring-after(/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:templateId/@root='2.16.840.1.113883.3.445.17']/n1:text/n1:paragraph[@ID='personname'], ': ')}" readonly="readonly" />
  1527. </td>
  1528. <td></td>
  1529. </tr>
  1530. <tr>
  1531. <td>연락처</td>
  1532. <td >
  1533. : <input type="text" class="comm_input" value="{substring-after(/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:templateId/@root='2.16.840.1.113883.3.445.17']/n1:text/n1:paragraph[@ID='persontelecom'], ': ')}" readonly="readonly"/>
  1534. </td>
  1535. <td></td>
  1536. </tr>
  1537. <tr>
  1538. <td>환자와의관계</td>
  1539. <td>
  1540. : <input type="text" class="comm_input" value="{substring-after(/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:templateId/@root='2.16.840.1.113883.3.445.17']/n1:text/n1:paragraph[@ID='relationship'], ': ')}" readonly="readonly"/>
  1541. </td>
  1542. <td></td>
  1543. </tr>
  1544. </table>
  1545. <div class="sign">
  1546. 서명 :
  1547. <br/>
  1548. <xsl:if test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section/n1:entry/n1:observationMedia/n1:entryRelationship/n1:observation[n1:templateId/@root='2.16.840.1.113883.3.445.19']/n1:value !=''">
  1549. <xsl:call-template name="show-signature">
  1550. <xsl:with-param name="signature" select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section/n1:entry/n1:observationMedia/n1:entryRelationship/n1:observation[n1:templateId/@root='2.16.840.1.113883.3.445.19']/n1:value"/>
  1551. </xsl:call-template>
  1552. </xsl:if>
  1553. </div>
  1554. </div>
  1555. <div class="contents" style="border: 1px solid #DBDBDB; border-left: 2px solid #215fb4;">
  1556. <ol>
  1557. <li>1. ‘법정대리인’란은 대리인이 요구인일 때에만 적습니다.</li>
  1558. <li>2. 진료정보교류에 대해 일부 의료기관에 대해서만 동의를 철회하는 경우, ‘부분 의료기관’란에[ √ ]표시를 하고, 의료기관명에 철회하고자 하는 의료기관 명칭을 나열하여야 합니다. [ √ ]를 하지 않거나 의료기관명을 나열하지 않으면 동의를 철회하지 않은 것으로 처리됩니다.</li>
  1559. <li>3. 진료정보교류에 대해 일부 진료과에 대해서만 동의를 철회하는 경우, ‘부분 진료과’란에[ √ ]표시를 하고, 진료과명에 철회하고자 하는 진료과명을 나열하여야 합니다. [ √ ]를 하지 않거나 진료과명을 나열하지 않으면 동의를 철회하지 않은 것으로 처리됩니다.</li>
  1560. <li>4. 진료교류정보 전체에 대해 철회를 요구하는 경우 ‘전체’ 란에 [ √ ] 표시를 하고 그 사유를 적습니다.</li>
  1561. </ol>
  1562. </div>
  1563. </div>
  1564. <!-- /wrap -->
  1565. </div>
  1566. <!-- /body_wrap -->
  1567. </body>
  1568. </xsl:template>
  1569. <!-- ## Body ##-->
  1570. <!-- show nonXMLBody -->
  1571. <xsl:template match='n1:component/n1:nonXMLBody'>
  1572. <xsl:choose>
  1573. <!-- if there is a reference, use that in an IFRAME -->
  1574. <xsl:when test='n1:text/n1:reference'>
  1575. <xsl:variable name="source" select="string(n1:text/n1:reference/@value)"/>
  1576. <xsl:variable name="lcSource" select="translate($source, $uc, $lc)"/>
  1577. <xsl:variable name="scrubbedSource" select="translate($source, $simple-sanitizer-match, $simple-sanitizer-replace)"/>
  1578. <xsl:message>
  1579. <xsl:value-of select="$source"/>, <xsl:value-of select="$lcSource"/>
  1580. </xsl:message>
  1581. <xsl:choose>
  1582. <xsl:when test="contains($lcSource,'javascript')">
  1583. <p>
  1584. <xsl:value-of select="$javascript-injection-warning"/>
  1585. </p>
  1586. <xsl:message>
  1587. <xsl:value-of select="$javascript-injection-warning"/>
  1588. </xsl:message>
  1589. </xsl:when>
  1590. <xsl:when test="not($source = $scrubbedSource)">
  1591. <p>
  1592. <xsl:value-of select="$malicious-content-warning"/>
  1593. </p>
  1594. <xsl:message>
  1595. <xsl:value-of select="$malicious-content-warning"/>
  1596. </xsl:message>
  1597. </xsl:when>
  1598. <xsl:otherwise>
  1599. <iframe name='nonXMLBody' id='nonXMLBody' WIDTH='80%' HEIGHT='600' src='{$source}' sandbox=""/>
  1600. </xsl:otherwise>
  1601. </xsl:choose>
  1602. </xsl:when>
  1603. <xsl:when test='n1:text/@mediaType="text/plain"'>
  1604. <pre>
  1605. <xsl:value-of select='n1:text/text()'/>
  1606. </pre>
  1607. </xsl:when>
  1608. <xsl:otherwise>
  1609. <pre>Cannot display the text</pre>
  1610. </xsl:otherwise>
  1611. </xsl:choose>
  1612. </xsl:template>
  1613. <!-- ##################### Data format ##################### -->
  1614. <!-- show-gender-kr -->
  1615. <xsl:template name="show-gender-kr">
  1616. <xsl:param name="gender"/>
  1617. <xsl:choose>
  1618. <xsl:when test="$gender/@code = &apos;M&apos;">
  1619. <xsl:text>남</xsl:text>
  1620. </xsl:when>
  1621. <xsl:when test="$gender/@code = &apos;F&apos;">
  1622. <xsl:text>여</xsl:text>
  1623. </xsl:when>
  1624. <xsl:when test="$gender/@code = &apos;U&apos;">
  1625. <xsl:text>식별불가</xsl:text>
  1626. </xsl:when>
  1627. </xsl:choose>
  1628. </xsl:template>
  1629. <!-- show signature -->
  1630. <xsl:template name="show-signature">
  1631. <xsl:param name="signature"/>
  1632. <xsl:element name="img">
  1633. <xsl:attribute name="width">140</xsl:attribute>
  1634. <xsl:attribute name="height">85</xsl:attribute>
  1635. <xsl:attribute name="src">data:image/png;base64,<xsl:value-of select="$signature"/></xsl:attribute>
  1636. </xsl:element>
  1637. </xsl:template>
  1638. <!-- show date ( format : yyyy-MM-dd )-->
  1639. <xsl:template name="getDate">
  1640. <xsl:param name="date"/>
  1641. <xsl:choose>
  1642. <xsl:when test="$date/@value">
  1643. <xsl:value-of select="concat(substring($date/@value,1,4),'-',substring($date/@value,5,2),'-',substring($date/@value,7,2))"/>
  1644. <xsl:text> </xsl:text>
  1645. </xsl:when>
  1646. <xsl:otherwise>
  1647. <xsl:value-of select="$date"/>
  1648. </xsl:otherwise>
  1649. </xsl:choose>
  1650. </xsl:template>
  1651. <!-- show date ( format : yyyy.MM.dd )-->
  1652. <xsl:template name="getDate2">
  1653. <xsl:param name="date"/>
  1654. <xsl:choose>
  1655. <xsl:when test="$date/@value">
  1656. <xsl:value-of select="concat(substring($date/@value,1,4),'.',substring($date/@value,5,2),'.',substring($date/@value,7,2),'.')"/>
  1657. <xsl:text> </xsl:text>
  1658. </xsl:when>
  1659. <xsl:otherwise>
  1660. <xsl:value-of select="$date"/>
  1661. </xsl:otherwise>
  1662. </xsl:choose>
  1663. </xsl:template>
  1664. <!-- show date ( format : yyyy년 MM월 dd일 )-->
  1665. <xsl:template name="getDate3">
  1666. <xsl:param name="date"/>
  1667. <xsl:choose>
  1668. <xsl:when test="$date/@value">
  1669. <xsl:value-of select="concat(substring($date/@value,1,4),'년 ',substring($date/@value,5,2),'월 ',substring($date/@value,7,2),'일')"/>
  1670. <xsl:text> </xsl:text>
  1671. </xsl:when>
  1672. <xsl:otherwise>
  1673. <xsl:value-of select="$date"/>
  1674. </xsl:otherwise>
  1675. </xsl:choose>
  1676. </xsl:template>
  1677. <!-- show-name-kr -->
  1678. <xsl:template name="show-name-kr">
  1679. <xsl:param name="name"/>
  1680. <xsl:choose>
  1681. <xsl:when test="$name/n1:family">
  1682. <xsl:if test="$name/n1:prefix">
  1683. <xsl:value-of select="$name/n1:prefix"/>
  1684. <xsl:text> </xsl:text>
  1685. </xsl:if>
  1686. <xsl:value-of select="$name/n1:family"/>
  1687. <!--<xsl:text> </xsl:text>-->
  1688. <xsl:value-of select="$name/n1:given"/>
  1689. <xsl:if test="$name/n1:suffix">
  1690. <xsl:text>, </xsl:text>
  1691. <xsl:value-of select="$name/n1:suffix"/>
  1692. </xsl:if>
  1693. </xsl:when>
  1694. <xsl:otherwise>
  1695. <xsl:value-of select="$name"/>
  1696. </xsl:otherwise>
  1697. </xsl:choose>
  1698. </xsl:template>
  1699. <!-- show-telecom-kr -->
  1700. <xsl:template name="show-telecom-kr">
  1701. <xsl:param name="telecom"/>
  1702. <xsl:choose>
  1703. <xsl:when test="$telecom">
  1704. <xsl:variable name="type" select="substring-before($telecom/@value, ':')"/>
  1705. <xsl:variable name="value" select="substring-after($telecom/@value, ':')"/>
  1706. <xsl:if test="$type">
  1707. <xsl:call-template name="translateTelecomCode">
  1708. <xsl:with-param name="code" select="$type"/>
  1709. </xsl:call-template>
  1710. <xsl:if test="@use">
  1711. <xsl:text> (</xsl:text>
  1712. <xsl:call-template name="translateTelecomCode">
  1713. <xsl:with-param name="code" select="@use"/>
  1714. </xsl:call-template>
  1715. <xsl:text>)</xsl:text>
  1716. </xsl:if>
  1717. <xsl:text>: </xsl:text>
  1718. <xsl:text> </xsl:text>
  1719. <xsl:value-of select="$value"/>
  1720. </xsl:if>
  1721. </xsl:when>
  1722. <xsl:otherwise>
  1723. <xsl:value-of select="$telecom/@value"/>
  1724. </xsl:otherwise>
  1725. </xsl:choose>
  1726. <br/>
  1727. </xsl:template>
  1728. <!-- Convert Telecom URL to display text -->
  1729. <xsl:template name="translateTelecomCode">
  1730. <xsl:param name="code"/>
  1731. <xsl:choose>
  1732. <!-- lookup table Telecom URI -->
  1733. <xsl:when test="$code='tel'">
  1734. <xsl:text>Tel</xsl:text>
  1735. </xsl:when>
  1736. <xsl:when test="$code='fax'">
  1737. <xsl:text>Fax</xsl:text>
  1738. </xsl:when>
  1739. <xsl:when test="$code='http'">
  1740. <xsl:text>Web</xsl:text>
  1741. </xsl:when>
  1742. <xsl:when test="$code='mailto'">
  1743. <xsl:text>Mail</xsl:text>
  1744. </xsl:when>
  1745. <xsl:when test="$code='H'">
  1746. <xsl:text>Home</xsl:text>
  1747. </xsl:when>
  1748. <xsl:when test="$code='HV'">
  1749. <xsl:text>Vacation Home</xsl:text>
  1750. </xsl:when>
  1751. <xsl:when test="$code='HP'">
  1752. <xsl:text>Primary Home</xsl:text>
  1753. </xsl:when>
  1754. <xsl:when test="$code='WP'">
  1755. <xsl:text>Work Place</xsl:text>
  1756. </xsl:when>
  1757. <xsl:when test="$code='PUB'">
  1758. <xsl:text>Pub</xsl:text>
  1759. </xsl:when>
  1760. <xsl:otherwise>
  1761. <xsl:text>{$code='</xsl:text>
  1762. <xsl:value-of select="$code"/>
  1763. <xsl:text>'?}</xsl:text>
  1764. </xsl:otherwise>
  1765. </xsl:choose>
  1766. </xsl:template>
  1767. <!-- show-address-kr-->
  1768. <xsl:template name="show-address-kr">
  1769. <xsl:param name="address"/>
  1770. <xsl:choose>
  1771. <xsl:when test="$address">
  1772. <xsl:if test="$address/@use">
  1773. <xsl:text> </xsl:text>
  1774. <xsl:call-template name="translateTelecomCode">
  1775. <xsl:with-param name="code" select="$address/@use"/>
  1776. </xsl:call-template>
  1777. <xsl:text>:</xsl:text>
  1778. <br/>
  1779. </xsl:if>
  1780. <xsl:if test="string-length($address/n1:country)>0">
  1781. <xsl:value-of select="$address/n1:country"/>
  1782. <xsl:text> </xsl:text>
  1783. </xsl:if>
  1784. <xsl:if test="string-length($address/n1:state)>0">
  1785. <xsl:value-of select="$address/n1:state"/>
  1786. <xsl:text> </xsl:text>
  1787. </xsl:if>
  1788. <xsl:if test="string-length($address/n1:city)>0">
  1789. <xsl:value-of select="$address/n1:city"/>
  1790. <xsl:text> </xsl:text>
  1791. </xsl:if>
  1792. <xsl:if test="string-length($address/n1:additionalLocator)>0">
  1793. <xsl:value-of select="$address/n1:additionalLocator"/>
  1794. <xsl:text> </xsl:text>
  1795. </xsl:if>
  1796. <xsl:for-each select="$address/n1:streetAddressLine">
  1797. <xsl:value-of select="."/>
  1798. <xsl:text> </xsl:text>
  1799. </xsl:for-each>
  1800. <xsl:if test="$address/n1:streetName">
  1801. <xsl:value-of select="$address/n1:streetName"/>
  1802. <xsl:text> </xsl:text>
  1803. <xsl:value-of select="$address/n1:houseNumber"/>
  1804. </xsl:if>
  1805. <xsl:if test="string-length($address/n1:postalCode)>0">
  1806. <xsl:text>&#160;</xsl:text>
  1807. <xsl:value-of select="$address/n1:postalCode"/>
  1808. </xsl:if>
  1809. </xsl:when>
  1810. <xsl:otherwise>
  1811. <xsl:text>유효하지 않은 주소정보</xsl:text>
  1812. </xsl:otherwise>
  1813. </xsl:choose>
  1814. <br/>
  1815. </xsl:template>
  1816. <!--BPPC-->
  1817. <xsl:template name="getGuardianRelationship">
  1818. <xsl:param name="code"/>
  1819. <xsl:choose>
  1820. <xsl:when test="$code='FTH'">
  1821. <xsl:text>부</xsl:text>
  1822. </xsl:when>
  1823. <xsl:when test="$code='MTH'">
  1824. <xsl:text>모</xsl:text>
  1825. </xsl:when>
  1826. <xsl:when test="$code='GRMTH'">
  1827. <xsl:text>조모</xsl:text>
  1828. </xsl:when>
  1829. <xsl:when test="$code='GRFTH'">
  1830. <xsl:text>조부</xsl:text>
  1831. </xsl:when>
  1832. <xsl:when test="$code='WIFE'">
  1833. <xsl:text>부인</xsl:text>
  1834. </xsl:when>
  1835. <xsl:when test="$code='HUSB'">
  1836. <xsl:text>남편</xsl:text>
  1837. </xsl:when>
  1838. <xsl:when test="$code='FAMMEMB'">
  1839. <xsl:text>가족</xsl:text>
  1840. </xsl:when>
  1841. <xsl:when test="$code='SONC'">
  1842. <xsl:text>자</xsl:text>
  1843. </xsl:when>
  1844. <xsl:when test="$code='DAUC'">
  1845. <xsl:text>딸</xsl:text>
  1846. </xsl:when>
  1847. <xsl:when test="$code='GRNDDAU'">
  1848. <xsl:text>손녀</xsl:text>
  1849. </xsl:when>
  1850. <xsl:when test="$code='GRNDSON'">
  1851. <xsl:text>손자</xsl:text>
  1852. </xsl:when>
  1853. <xsl:when test="$code='NBOR'">
  1854. <xsl:text>이웃</xsl:text>
  1855. </xsl:when>
  1856. <xsl:when test="$code='ROOM'">
  1857. <xsl:text>동거인</xsl:text>
  1858. </xsl:when>
  1859. <xsl:when test="$code='ONESELF'">
  1860. <xsl:text>본인</xsl:text>
  1861. </xsl:when>
  1862. <xsl:otherwise>
  1863. <xsl:text></xsl:text>
  1864. </xsl:otherwise>
  1865. </xsl:choose>
  1866. </xsl:template>
  1867. <!-- convert to lower case -->
  1868. <xsl:template name="caseDown">
  1869. <xsl:param name="data"/>
  1870. <xsl:if test="$data">
  1871. <xsl:value-of select="translate($data, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
  1872. </xsl:if>
  1873. </xsl:template>
  1874. <!-- convert to upper case -->
  1875. <xsl:template name="caseUp">
  1876. <xsl:param name="data"/>
  1877. <xsl:if test="$data">
  1878. <xsl:value-of select="translate($data,'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
  1879. </xsl:if>
  1880. </xsl:template>
  1881. <!-- convert first character to upper case -->
  1882. <xsl:template name="firstCharCaseUp">
  1883. <xsl:param name="data"/>
  1884. <xsl:if test="$data">
  1885. <xsl:call-template name="caseUp">
  1886. <xsl:with-param name="data" select="substring($data,1,1)"/>
  1887. </xsl:call-template>
  1888. <xsl:value-of select="substring($data,2)"/>
  1889. </xsl:if>
  1890. </xsl:template>
  1891. <!-- show-noneFlavor -->
  1892. <xsl:template name="show-noneFlavor">
  1893. <xsl:param name="nf"/>
  1894. <xsl:choose>
  1895. <xsl:when test=" $nf = 'NI' ">
  1896. <xsl:text>no information</xsl:text>
  1897. </xsl:when>
  1898. <xsl:when test=" $nf = 'INV' ">
  1899. <xsl:text>invalid</xsl:text>
  1900. </xsl:when>
  1901. <xsl:when test=" $nf = 'MSK' ">
  1902. <xsl:text>masked</xsl:text>
  1903. </xsl:when>
  1904. <xsl:when test=" $nf = 'NA' ">
  1905. <xsl:text>not applicable</xsl:text>
  1906. </xsl:when>
  1907. <xsl:when test=" $nf = 'UNK' ">
  1908. <xsl:text>unknown</xsl:text>
  1909. </xsl:when>
  1910. <xsl:when test=" $nf = 'OTH' ">
  1911. <xsl:text>other</xsl:text>
  1912. </xsl:when>
  1913. </xsl:choose>
  1914. </xsl:template>
  1915. <!-- /##################### Data format ##################### -->
  1916. <!-- ##################### Comment ##################### -->
  1917. <!-- 상단 문구-->
  1918. <xsl:template name="addComment">
  1919. <xsl:choose>
  1920. <!-- 진료회신서 / 진료회송서 의 경우 해당문구 출력.-->
  1921. <!-- 회송서 문구 : 회송 환자의 진료결과를 다음과 같이 알려드리오니 향후 진료에 참고하시기 바랍니다. -->
  1922. <!-- 진료회송서 -->
  1923. <xsl:when test="/n1:ClinicalDocument/n1:code/@code = '18761-7'">
  1924. <h3>
  1925. <xsl:value-of select="/n1:ClinicalDocument/n1:informationRecipient/n1:intendedRecipient/n1:receivedOrganization/n1:asOrganizationPartOf/n1:wholeOrganization/n1:name"/>
  1926. <xsl:text> </xsl:text>
  1927. <xsl:call-template name="show-name-kr">
  1928. <xsl:with-param name="name" select="/n1:ClinicalDocument/n1:informationRecipient/n1:intendedRecipient/n1:informationRecipient/n1:name"/>
  1929. </xsl:call-template>
  1930. 선생님 귀하
  1931. </h3>
  1932. <p>회송 환자의 진료결과를 다음과 같이 알려드리오니 향후 진료에 참고하시기 바랍니다.</p>
  1933. <p>귀원의 무궁한 발전을 기원합니다.</p>
  1934. <br/>
  1935. </xsl:when>
  1936. <xsl:when test="/n1:ClinicalDocument/n1:code/@code = '11488-4'">
  1937. <h3>
  1938. <xsl:value-of select="/n1:ClinicalDocument/n1:informationRecipient/n1:intendedRecipient/n1:receivedOrganization/n1:asOrganizationPartOf/n1:wholeOrganization/n1:name"/>
  1939. <xsl:text> </xsl:text>
  1940. <xsl:call-template name="show-name-kr">
  1941. <xsl:with-param name="name" select="/n1:ClinicalDocument/n1:informationRecipient/n1:intendedRecipient/n1:informationRecipient/n1:name"/>
  1942. </xsl:call-template>
  1943. 선생님 귀하
  1944. </h3>
  1945. <p>선생님께서 의뢰해주신 환자의 진료결과를 다음과 같이 알려드리오니 향후 진료에 참고하시기 바랍니다.</p>
  1946. <p>귀원의 무궁한 발전을 기원합니다.</p>
  1947. <br/>
  1948. </xsl:when>
  1949. <!-- 진료의뢰서 -->
  1950. <xsl:when test="/n1:ClinicalDocument/n1:code/@code = '57133-1' ">
  1951. <h3>
  1952. <xsl:value-of select="/n1:ClinicalDocument/n1:informationRecipient/n1:intendedRecipient/n1:receivedOrganization/n1:asOrganizationPartOf/n1:wholeOrganization/n1:name"/>
  1953. <xsl:text> </xsl:text>
  1954. <xsl:call-template name="show-name-kr">
  1955. <xsl:with-param name="name" select="/n1:ClinicalDocument/n1:informationRecipient/n1:intendedRecipient/n1:informationRecipient/n1:name"/>
  1956. </xsl:call-template>
  1957. 선생님 귀하
  1958. </h3>
  1959. <br/>
  1960. </xsl:when>
  1961. <xsl:otherwise></xsl:otherwise>
  1962. </xsl:choose>
  1963. </xsl:template>
  1964. <!-- 하단 문구 -->
  1965. <xsl:template name="addBottomComment">
  1966. <!--회신서 / 회송서 문구-->
  1967. <xsl:choose>
  1968. <xsl:when test="/n1:ClinicalDocument/n1:code/@code = '18761-7' or /n1:ClinicalDocument/n1:code/@code ='11488-4'">
  1969. <div class ="main_content">
  1970. <h3 style="text-align : center;">
  1971. 향후 귀병원에서 치료를 계속하실 계획이 있으시거나 더 궁금하신 사항은<br/>
  1972. 전화(000-000-0000) 또는 팩스(000-000-0000) 로 연락주시면 곧 회답하여 드리겠습니다.
  1973. </h3>
  1974. <br/>
  1975. <table border="0">
  1976. <tbody>
  1977. <tr>
  1978. <td width="50%"></td>
  1979. <td width="10%">
  1980. <h6>진료과</h6>
  1981. </td>
  1982. <td width="20%">
  1983. <xsl:value-of select="/n1:ClinicalDocument/n1:author/n1:assignedAuthor/n1:representedOrganization/n1:name"/>
  1984. </td>
  1985. <td width="10%">
  1986. <h6>진료의</h6>
  1987. </td>
  1988. <td width="10%">
  1989. <xsl:value-of select="/n1:ClinicalDocument/n1:author/n1:assignedAuthor/n1:assignedPerson/n1:name/n1:family"/>
  1990. <xsl:value-of select="/n1:ClinicalDocument/n1:author/n1:assignedAuthor/n1:assignedPerson/n1:name/n1:given"/>
  1991. </td>
  1992. </tr>
  1993. <tr>
  1994. <td></td>
  1995. <td colspan="2">
  1996. <h6>A 병원 진료협력센터</h6>
  1997. </td>
  1998. <td>
  1999. <h6>담당자</h6>
  2000. </td>
  2001. <td>
  2002. <xsl:value-of select="/n1:ClinicalDocument/n1:participant[@typeCode='AUT']/n1:associatedEntity/n1:associatedPerson/n1:name/n1:family"/>
  2003. <xsl:value-of select="/n1:ClinicalDocument/n1:participant[@typeCode='AUT']/n1:associatedEntity/n1:associatedPerson/n1:name/n1:given"/>
  2004. </td>
  2005. </tr>
  2006. </tbody>
  2007. </table>
  2008. <br/>
  2009. <h3 style="text-align : center;">
  2010. 이 기록은 의무기록에 근거하여 작성되었습니다.
  2011. </h3>
  2012. <br/>
  2013. <p style="text-align : right;">
  2014. 문의전화 : 000-000-0000 (A병원 진료협력센터)
  2015. </p>
  2016. </div>
  2017. </xsl:when>
  2018. <xsl:otherwise></xsl:otherwise>
  2019. </xsl:choose>
  2020. </xsl:template>
  2021. <!-- /##################### Comment ##################### -->
  2022. </xsl:stylesheet>