|
@@ -4,6 +4,10 @@
|
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
|
|
pageEncoding="UTF-8"%>
|
|
|
<jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
|
|
|
+<script src="/resources/plugins/highlight/highlight.pack.js"></script>
|
|
|
+<link rel="stylesheet" href="/resources/plugins/highlight/styles/androidstudio.css">
|
|
|
+<script>hljs.initHighlightingOnLoad();</script>
|
|
|
+
|
|
|
<script>
|
|
|
$( function(){
|
|
|
$( "#newForm" ).validate({
|
|
@@ -198,11 +202,13 @@ $( function(){
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="row mb-5">
|
|
|
- <div class="col-12 text-center">
|
|
|
- <button class="btn btn-success btn-block p-2" onclick="location.href='./new';">신청자 정보 수정</button>
|
|
|
+ <c:if test="${viewType eq 'USER'}">
|
|
|
+ <div class="row mb-5">
|
|
|
+ <div class="col-12 text-center">
|
|
|
+ <button class="btn btn-success btn-block p-2" onclick="location.href='./new';">신청자 정보 수정</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </c:if>
|
|
|
|
|
|
<c:if test="${viewType eq 'USER' and info.useYn eq 'C'}">
|
|
|
<h2 class="text-dark mb-3 pb-2 border-bottom">API 연동 안내</h2>
|
|
@@ -211,7 +217,7 @@ $( function(){
|
|
|
<h3 class="mb-4"><span class="badge badge-warning h6">></span> Request</h3>
|
|
|
|
|
|
<h5>URL</h5>
|
|
|
- <div class="bg-dark text-white p-3 border-radius m-2">
|
|
|
+ <div class="bg-dark text-white p-3 border-radius m-2 h5">
|
|
|
<div>
|
|
|
<span class="mr-2 text-warning">POST</span>
|
|
|
<span>/lifeCenter/api/toAction</span>
|
|
@@ -328,8 +334,8 @@ $( function(){
|
|
|
<div class="mt-3">
|
|
|
<span class="h4 text-muted p-2">생활치료센터의 모든 환자일 경우</span>
|
|
|
</div>
|
|
|
- <div class="bg-dark m-2 p-4">
|
|
|
-<pre class="mb-0"><code class="language-json hljs h4 text-light">{
|
|
|
+ <div class="m-2">
|
|
|
+<pre class="mb-0"><code class="p-3 h4">{
|
|
|
<span class="hljs-attr">"resourceType"</span>: <span class="hljs-string">"patientInfoList"</span>,
|
|
|
<span class="hljs-attr">"patientNumber"</span>: <span class="hljs-string">""</span>,
|
|
|
<span class="hljs-attr">"patientName"</span>: <span class="hljs-string">""</span>,
|
|
@@ -346,8 +352,8 @@ $( function(){
|
|
|
<div class="mt-5">
|
|
|
<span class="h4 text-muted p-2">생활치료센터의 모든 환자일 경우 (patientNumber로 단일 대상)</span>
|
|
|
</div>
|
|
|
- <div class="bg-dark m-2 p-4">
|
|
|
-<pre class="mb-0"><code class="language-json hljs h4 text-light">{
|
|
|
+ <div class="m-2">
|
|
|
+<pre class="mb-0"><code class="p-3 h4">{
|
|
|
<span class="hljs-attr">"resourceType"</span>: <span class="hljs-string">"patientInfoList"</span>,
|
|
|
<span class="hljs-attr">"patientNumber"</span>: <span class="hljs-string">"62817236"</span>,
|
|
|
<span class="hljs-attr">"patientName"</span>: <span class="hljs-string">""</span>,
|
|
@@ -364,8 +370,8 @@ $( function(){
|
|
|
<div class="mt-5">
|
|
|
<span class="h4 text-muted p-2 mt-3">생활치료센터의 모든 환자일 경우 (patientNumber가 없는 경우 단일 대상)</span>
|
|
|
</div>
|
|
|
- <div class="bg-dark m-2 p-4">
|
|
|
-<pre class="mb-0"><code class="language-json hljs h4 text-light">{
|
|
|
+ <div class="m-2">
|
|
|
+<pre class="mb-0"><code class="p-3 h4">{
|
|
|
<span class="hljs-attr">"resourceType"</span>: <span class="hljs-string">"patientInfoList"</span>,
|
|
|
<span class="hljs-attr">"patientNumber"</span>: <span class="hljs-string">""</span>,
|
|
|
<span class="hljs-attr">"patientName"</span>: <span class="hljs-string">"홍길동"</span>,
|
|
@@ -381,12 +387,98 @@ $( function(){
|
|
|
|
|
|
<h3 class="text-dark mb-3 pb-2 border-bottom mt-5" id="token"><span class="badge badge-danger text-white"> ! </span> Token 생성 방법</h3>
|
|
|
<div class="h6 p-3 border bg-muted">
|
|
|
- <div class="mb-2 h4 text-muted">api 신청자 ID, 요양기관기호, 현재시간을 합쳐서 발급받은 api key로 AES256 암호화 구분자는 | 로 구분</div>
|
|
|
+ <div class="mb-2 h4 text-muted">- 생성한 token은 15분 이내 까지 유효함</div>
|
|
|
+ <div class="mb-2 h4 text-muted">- api 신청자 ID, 요양기관기호, 현재시간을 합쳐서 발급받은 api key로 AES256 암호화 구분자는 | 로 구분</div>
|
|
|
<div class="mb-2 h4"><code>decrypt : admin0027|31100988|2021-01-19 10:24:23</code><br/><code>encrypt : FPg9yiuiBmzYIixL1zL549mA6zzPo4rbRSvCSAc6e2eB7q9AjONroEuMJtB7kJ8u</code></div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
- <h3 class="mb-4"><span class="badge badge-warning h6">></span> Response</h3>
|
|
|
+ <div class="mt-3">
|
|
|
+ <span class="h4 text-muted p-2 mt-3">현재 시간</span>
|
|
|
+ </div>
|
|
|
+<div class="m-2">
|
|
|
+<pre class="mb-0"><code class="p-3 h4">public static String getNow() {
|
|
|
+ DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ Date date = new Date();
|
|
|
+
|
|
|
+ return dateFormat.format(date);
|
|
|
+ }
|
|
|
+</code></pre></div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="mt-3">
|
|
|
+ <span class="h4 text-muted p-2 mt-3">AES256 encrypt</span>
|
|
|
+ </div>
|
|
|
+<div class="m-2">
|
|
|
+<pre class="mb-0"><code class="p-3 h4">public static byte[] IV = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
|
|
+public static String aesEncrypt(String encKey, byte[] iv, String paramInput) throws Exception {
|
|
|
+ Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
|
|
|
+ SecretKeySpec key = new SecretKeySpec(encKey.getBytes("UTF-8"), "AES");
|
|
|
+
|
|
|
+ cipher.init(Cipher.ENCRYPT_MODE, key, new IvParameterSpec(iv));
|
|
|
+
|
|
|
+ byte[] cipherText = cipher.doFinal(paramInput.getBytes("UTF-8"));
|
|
|
+
|
|
|
+ return Base64.getEncoder().encodeToString(cipherText);
|
|
|
+ }
|
|
|
+</code></pre></div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <h3 class="mb-4 mt-5"><span class="badge badge-warning h6">></span> Response</h3>
|
|
|
+
|
|
|
+ <h5>Success</h5>
|
|
|
+ <div class="p-2 mb-3">
|
|
|
+ <table class="table">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>Type</th>
|
|
|
+ <th>Description</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td><code>String</code></td>
|
|
|
+ <td>요청 성공시 랜덤 문자열(api key) retrun <br/>
|
|
|
+ <code class="text-info">Ex) FPg9yiuiBmzYIixL1zL549mA6zzPo4rbRSvCSAc6e2eB7q9AjONroEuMJtB7kJ8u</code>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <h5>Failure</h5>
|
|
|
+ <div class="p-2">
|
|
|
+ <table class="table">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>Name</th>
|
|
|
+ <th>Type</th>
|
|
|
+ <th>Value</th>
|
|
|
+ <th>Description</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td rowspan="3">error</td>
|
|
|
+ <td rowspan="3"><code>String</code></td>
|
|
|
+ <td>emptyToken</td>
|
|
|
+ <td>토큰이 없는 경우</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>invalidParameters</td>
|
|
|
+ <td>필수입력 값과 token의 값이 일치하지 않는 경우</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>expireToken</td>
|
|
|
+ <td>토큰 유효 시간이 지났을 경우</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</c:if>
|
|
@@ -396,9 +488,11 @@ $( function(){
|
|
|
</c:choose>
|
|
|
|
|
|
<!-- 서비스 소개 내용 -->
|
|
|
+ <c:if test="${viewType eq 'USER'}">
|
|
|
<button class="btn btn-light text-center border-bottom mt-3" onclick="$('div.api-info-wrap').toggle( 200 );$(this).children().toggleClass('fa-caret-up');">
|
|
|
<i class="fa fa-fw fa-caret-down text-dark text-muted"></i>
|
|
|
</button>
|
|
|
+ </c:if>
|
|
|
|
|
|
<div class="api-info-wrap mt-4" <c:if test="${info ne null}">style="display:none;"</c:if>>
|
|
|
<h2 class="text-dark mb-3 pb-2 border-bottom mt-4">생활치료센터 비대면진료시스템 API 목록</h2>
|