-
Notifications
You must be signed in to change notification settings - Fork 0
9999.HoM Open API
지정한 edited this page May 30, 2017
·
13 revisions
How to use
-
API 폴더 안에 존재하는 HoM_API.php 파일을 다운 받는다.
-
해당 라이브러리 파일을 사용할 php 파일 상단에 다음과 같은 코드를 추가한다.
require("lib/HoM_API.php"); -
라이브러리 파일의 주석을 참고하여 알맞은 함수를 콜하여 사용한다.
-
아래 라이브러리 파일 사용 예시를 참고하여 사용한다.
- 파일 전송 화면 *
<form name="upload" method="post" enctype="multipart/form-data" action="http://homcare.xyz/parserAPI_worker.php">
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
<table width="600" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td colspan="2" bgcolor="#FFFFFF">Upload XML</td>
</tr>
<tr>
<td width="150" align="center" bgcolor="#FFFFFF">Upload file</td>
<td width="464" bgcolor="#FFFFFF"><input type="file" name="emrXML" /></td>
</tr>
<tr>
<br>
<td colspan="2" bgcolor="#FFFFFF"><input type="submit" value="submit" /><input type="reset" value="reset"></td>
</tr>
</table>
</form>
- 결과 *
`<?php require("lib/HoM_API.php");
dir_init("/var/www/html/emr_repository/");
dest_init("parserAPI.xml");
file_init($_FILES['emrXML']['tmp_name']);
$error = save_file();
$result = parsing();
foreach($result as $key => $value){
echo "KEY -> ".$key;
echo " VALUE ->".$value;
echo "<br>";
}
?>`
- 구글 맵 이용한 마커 생성 및 설정 *
MIT License
Copyright (c) 2017 HoM Open API
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.