-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_opd_visit.php
64 lines (58 loc) · 2.26 KB
/
test_opd_visit.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<?php
chdir(__DIR__);
ini_set('default_charset', 'UTF-8');
ini_set('display_errors', '1');
require_once 'vendor/autoload.php';
# set the url of the server
$url = 'http://10.1.88.8/HIS/index.php/OpdVisitRpcS';
//$url = 'http://e4d4bb07.ngrok.io/HIS/index.php/OpdVisitRpcS';
# create our client object, passing it the server url
$Client = new JsonRpc\Client($url);
# set up our rpc call with a method and params
$success = false;
/**
* ค้นหาข้อมูลด้วย HN. 365656 เพื่อทดสอบการเชื่อมระบบ
*/
//$success = $Client->call('getByHn', ['365656']);
/**
* ค้นหาข้อมูลด้วย HN. 460028 และ div_id DP1 เพื่อทดสอบการเชื่อมระบบ
*/
$success = $Client->call('getByHnDiv', ['782761','O10']);
/**
* ค้นหาข้อมูลด้วย HN. 365656 เพื่อทดสอบการเชื่อมระบบ
*/
//$success = $Client->call('getToday', []);
/**
* ค้นหาข้อมูลด้วย ชื่อและนามสกุล
*/
//$success = $Client->call('getByName', ['โน', 'จิ']);
?>
<html>
<head>
<meta charset="UTF-8">
<title>การรับบริการผู้ป่วยนอกโรงพยาบาลเทพธารินทร์(JsonRPC)</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="page-header">
<h1>ข้อมูลการรับบริการผู้ป่วยนอก(JsonRPC)</h1>
</div>
<?php
echo '<b>Json RPC:</b> ', $url;
echo '<br /><br />';
echo '<b>result:</b> ', print_r($Client->result, 1);
echo '<br /><br />';
echo '<b>error:</b> ', $Client->error;
echo '<br /><br />';
echo '<b>output:</b> ', $Client->output;
?>
</div>
</body>
</html>