3 * Provider publish fhir UI
4 * (Temporary rest test interface until add a model)
7 * @link http://www.open-emr.org
8 * @author Jerry Padgett <sjpadgett@gmail.com>
9 * @copyright Copyright (c) 2018 Jerry Padgett <sjpadgett@gmail.com>
10 * @license https://www.gnu.org/licenses/agpl-3.0.en.html GNU Affero General Public License 3
13 require_once("../interface/globals.php");
14 require_once("./libs/controller/ClientAppController.php");
16 use OpenEMR\Core\Header
;
18 // kick off app endpoints controller
19 $clientApp = new clientController();
21 echo "<script>var pid='" . attr($pid) . "'</script>";
26 <?php Header
::setupHeader(['opener']); ?
>
28 $
(document
).ready(function () {
32 function doPublish(e
, req
) {
36 let wait
= '<i class="fa fa-cog fa-spin fa-4x"></i>';
37 let profile
= getSelResource();
38 if (profile
=== 'Encounter' && req
=== 'create') {
39 req
= req +
'EncounterAll';
41 let actionUrl
= '?action=' + req
;
42 let id
= pid
; // eventually will be other live id's
43 $
("#dashboard").empty().html(wait
);
44 return $
.post(actionUrl
, {'type': profile
, 'pid': pid
, oeid
: id
}).done(function (data
) {
45 $
("#dashboard").empty().html('<pre>' + data +
'</pre>');
49 function getSelResource() {
50 return $
('#resource option:selected').val()
56 <nav
class="navbar navbar-default navbar-static-top">
57 <div
class="container-fluid">
58 <div
class="navbar-header">
59 <button type
="button" class="navbar-toggle collapsed" data
-toggle
="collapse"
60 data
-target
="#nav-header-collapse">
61 <span
class="sr-only"><?php
echo xlt('Toggle'); ?
></span
>
62 <span
class="icon-bar"></span
>
63 <span
class="icon-bar"></span
>
64 <span
class="icon-bar"></span
>
66 <a
class="navbar-brand" href
="#">
67 <?php
echo xlt('oeFHIR'); ?
>
70 <div
class="collapse navbar-collapse" id
="nav-header-collapse">
71 <form
class="navbar-form navbar-left" method
="GET" role
="search">
72 <div
class="form-group">
73 <input type
="text" name
="q" class="form-control" placeholder
="<?php echo xla('Search'); ?>">
75 <button type
="submit" class="btn btn-default"><i
class="glyphicon glyphicon-search"></i
></button
>
77 <ul
class="nav navbar-nav navbar-right">
78 <li
class="dropdown ">
79 <a href
="#" class="dropdown-toggle" data
-toggle
="dropdown" role
="button" aria
-expanded
="false">
80 <?php
echo xlt('Activity'); ?
>
81 <span
class="caret"></span
></a
>
82 <ul
class="dropdown-menu" role
="menu">
83 <li
class="dropdown-header"><?php
echo xlt('Profiles'); ?
></li
>
84 <li
class=""><a href
="#"><?php
echo xlt('CCD'); ?
></a
></li
>
85 <li
class=""><a href
="#"><?php
echo xlt('Care Plan'); ?
></a
></li
>
86 <li
class=""><a href
="#"><?php
echo xlt('Episode'); ?
></a
></li
>
87 <li
class="divider"></li
>
88 <li
class="dropdown-header"><?php
echo xlt('Resources'); ?
></li
>
89 <li
class=""><a href
="#"><?php
echo xlt('Patient'); ?
></a
></li
>
90 <li
class=""><a href
="#"><?php
echo xlt('Organization'); ?
></a
></li
>
91 <li
class="divider"></li
>
92 <li
><a href
="#"><?php
echo xlt('Server Login'); ?
></a
></li
>
95 <li
><a href
="https://fhirtest.uhn.ca" rel
="noopener" target
="_blank"><?php
echo xlt('Visit Test Server'); ?
></a
></li
>
97 </div
><!-- /.navbar
-collapse
-->
98 </div
><!-- /.container
-fluid
-->
100 <div
class="container-fluid main-container">
103 <div
class="col-md-2 content form-group">
104 <div
class="input-group input-group-sm">
105 <label
for="enc"><?php
echo xlt('Resource (select one)') ?
></label
>
106 <select
class="form-control" id
="resource">
107 <option value
="Patient" selected
><?php
echo xlt('Current Patient') ?
></option
>
108 <option value
="Encounter"><?php
echo xlt('All Encounters') ?
></option
>
115 <div
class="col-md-2 sidebar">
116 <ul
class="nav nav-pills nav-stacked">
117 <li
class="active"><a href
="#"><?php
echo xlt('Home'); ?
></a
></li
>
118 <li
><a onclick
="doPublish(event, 'create')" href
="#"><?php
echo xlt('Publish'); ?
></a
></li
>
119 <li
><a onclick
="doPublish(event, 'read')" href
="#"><?php
echo xlt('Read'); ?
></a
></li
>
120 <li
><a onclick
="doPublish(event, 'history')" href
="#"><?php
echo xlt('Get History'); ?
></a
></li
>
121 <li
><a onclick
="doPublish(event, 'search')" href
="#"><?php
echo xlt('Search'); ?
></a
></li
>
122 <li
><a href
="#"></a
></li
>
126 <div
class="col-md-10 content">
127 <div
class="panel panel-default">
128 <div
class="panel-heading">
129 <?php
echo xlt('Dashboard'); ?
>
131 <div id
="dashboard" class="panel-body">
135 <footer
class="pull-left footer">
136 <p
class="col-md-12">