-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrecordprint.php
executable file
·140 lines (124 loc) · 3.95 KB
/
recordprint.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?php
include('includes/functions.php');
if(isset($_GET['id'])){
$rid = $_GET['id'];
$url = "https://apis.stmorg.in/medical/records/records?rid=".$rid;
$data = get_api_data($url);
$data = json_decode($data, true);
$data = $data['data'];
$pid = $data[0]['pid'];
$url = "https://apis.stmorg.in/medical/patients/patients?pquery=".$pid;
$pdata = get_api_data($url);
$pdata = json_decode($pdata, true);
$pdata = $pdata['data'];
$doctor = $data[0]['doctor'];
$url = "https://apis.stmorg.in/medical/doctors/doctors?did=".$doctor;
$ddata = get_api_data($url);
$ddata = json_decode($ddata, true);
$ddata = $ddata['data'];
$diag = $data[0]['diagnosis'];
$url = "https://apis.stmorg.in/medical/diagnosis/diagnosis?did=".$diag;
$diagdata = get_api_data($url);
$diagdata = json_decode($diagdata, true);
$diagdata = $diagdata['data'];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<!-- plugins:css -->
<link rel="stylesheet" href="assets/vendors/mdi/css/materialdesignicons.min.css" />
<link rel="stylesheet" href="assets/vendors/css/vendor.bundle.base.css" />
<!-- ovveride css -->
<link rel="stylesheet" href="assets/css/custom_override.css?v=1" />
<!-- Layout styles -->
<link rel="stylesheet" href="assets/css/style.css" />
<!-- End layout styles -->
<link rel="shortcut icon" href="assets/images/favicon.ico" />
<script>
window.onload = function() {
window.print();
window.close();
}
</script>
<style>
body {
height: 100vh;
}
.viewrecord.top {
border: 1px solid;
padding: 1em;
}
.main-col {
width: 50%;
display: flex;
}
.main-col .row {
margin: 0;
}
.row-col {
display: flex;
}
.pre {
white-space: pre-wrap;
margin-top: 1.5em;
}
.pre .main-col {
flex-direction: column;
}
</style>
</head>
<body>
<header style="text-align: center; height: 12vh;">
<img src="assets/arundhati/header.jpg" alt="Lights">
</header>
<main style="margin: auto 10%;margin-top: 0.1em;">
<p style="text-align: center;
font-style: italic;">The following camp was conducted by Service to Mankind (https://stmorg.in)</p>
<div class="viewrecord top">
<div class="row-col">
<div class="main-col">
<h5>Patient Name : <?php echo $pdata[0]['name']; ?></h5>
</div>
<div class="main-col">
<h5>Patient Id : <?php echo $data[0]['pid']; ?></h5>
</div>
</div>
<div class="row-col">
<div class="main-col">
<h5>Diagnosis : <?php echo $diagdata[0]['name']; ?></h5>
</div>
<div class="main-col">
<h5>Doctor <?php echo $ddata[0]['name']; ?></h5>
</div>
</div>
<div class="row-col">
<div class="main-col">
<h5>Record Id : <?php echo $data[0]['id']; ?></h5>
</div>
<div class="main-col">
<h5>Date : <?php echo $data[0]['last_visit']; ?></h5>
</div>
</div>
</div>
<div class="viewrecord bottom">
<div class="row-col pre">
<div class="main-col">
<h5>Prescription : </h5>
<p><?php echo $data[0]['prescription']; ?></p>
</div>
</div>
</div>
</main>
<footer style="text-align: center;height: 8.5vh;
position: absolute;
width: 100%;
bottom: 0;">
<img src=" assets/arundhati/footer.jpg" alt="Lights">
</footer>
</body>
</html>