Backend Service

This commit is contained in:
2019-04-07 18:26:11 +00:00
parent 3ce5d45015
commit 83bf41ec2a
4 changed files with 96 additions and 112 deletions
@@ -46,7 +46,7 @@ class Patient extends Provider_Controller {
} }
public function patientView() { public function patientView() {
echo $data['patient_id'] = trim($this->input->post('patientID')); $data['patient_id'] = trim($this->input->post('patientID'));
$this->load->model('patient_model'); $this->load->model('patient_model');
$out = $this->patient_model->LoadPatient(0, $data['patient_id']); $out = $this->patient_model->LoadPatient(0, $data['patient_id']);
@@ -98,5 +98,9 @@ class Patient extends Provider_Controller {
$this->renderProviderSecurePage('patient/thispatientChart', $data); $this->renderProviderSecurePage('patient/thispatientChart', $data);
} }
} }
public function linkpatient(){
echo 'Ameye';
}
} }
@@ -1,5 +1,5 @@
<div class="card card-statistics h-10 m-b-30"> <div class="card card-statistics h-100 m-b-30">
<div class="card-header d-flex align-items-center justify-content-between"> <div class="card-header d-flex align-items-center justify-content-between">
<div class="card-heading"> <div class="card-heading">
<h4 class="card-title">Patients List</h4> <h4 class="card-title">Patients List</h4>
@@ -10,7 +10,7 @@
</div> </div>
</div> </div>
<div class="card-body scrollbar scroll_dark pt-0" style="max-height: 350px;"> <div class="card-body scrollbar scroll_dark pt-0" style="max-height: 630px;">
<div class="datatable-wrapper table-responsive"> <div class="datatable-wrapper table-responsive">
<table id="datatable" class="table table-borderless table-striped"> <table id="datatable" class="table table-borderless table-striped">
<thead> <thead>
@@ -17,7 +17,7 @@
<div class="row"> <div class="row">
<div class="col-lg-6 col-xxl-4 m-b-30"> <div class="col-lg-6 col-xxl-4 m-b-30">
<div class="card card-statistics h-100 mb-0"> <div class="card card-statistics h-100 mb-0">
<div class="card-header d-flex justify-content-between"> <div class="card-header d-flex justify-content-between">
<div class="card-heading"> <div class="card-heading">
@@ -28,21 +28,21 @@
</div> </div>
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="card-body"> <div class="card-body">
<form method="POST" action="/patient/addnew"> <form method="POST" action="/patient/addnew">
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="inputEmail4">Firstname</label> <label for="inputEmail4">Firstname</label>
<input type="text" class="form-control" id="firstname" name="firstname" value="<?=$firstname?>" placeholder="Firstname"> <input type="text" class="form-control" id="firstname" name="firstname" value="<?= $firstname ?>" placeholder="Firstname">
</div> </div>
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="inputPassword4">Lastname</label> <label for="inputPassword4">Lastname</label>
<input type="text" class="form-control" id="lastname" name="lastname" value="<?=$lastname?>" placeholder="Lastname"> <input type="text" class="form-control" id="lastname" name="lastname" value="<?= $lastname ?>" placeholder="Lastname">
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="inputEmail4">Email</label> <label for="inputEmail4">Email</label>
@@ -50,21 +50,21 @@
</div> </div>
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="inputPassword4">Password</label> <label for="inputPassword4">Password</label>
<input type="password" class="form-control" id="password" value="<?=$password?>" placeholder="Password"> <input type="password" class="form-control" id="password" value="<?= $password ?>" placeholder="Password">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="inputAddress">Address</label> <label for="inputAddress">Address</label>
<input type="text" class="form-control" id="street1" name="street1" value="<?=$street1?>" placeholder="1234 Main St"> <input type="text" class="form-control" id="street1" name="street1" value="<?= $street1 ?>" placeholder="1234 Main St">
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="inputAddress2">Address 2</label> <label for="inputAddress2">Address 2</label>
<input type="text" class="form-control" id="street2" name="street2" value="<?=$street2?>" placeholder="Apartment, studio, or floor"> <input type="text" class="form-control" id="street2" name="street2" value="<?= $street2 ?>" placeholder="Apartment, studio, or floor">
</div> </div>
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="inputCity">City</label> <label for="inputCity">City</label>
<input type="text" class="form-control" id="city" name="city" value="<?=$city?>"> <input type="text" class="form-control" id="city" name="city" value="<?= $city ?>">
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="inputState">State</label> <label for="inputState">State</label>
@@ -72,50 +72,50 @@
<option selected>Select State</option> <option selected>Select State</option>
<option value="OGUN">Ogun</option> <option value="OGUN">Ogun</option>
<option value="OYO">Oyo</option> <option value="OYO">Oyo</option>
<option value="OSUN" selected>Osun</option> <option value="OSUN" selected>Osun</option>
</select> </select>
</div> </div>
<div class="form-group col-md-2"> <div class="form-group col-md-2">
<label for="inputZip">Zip</label> <label for="inputZip">Zip</label>
<input type="text" class="form-control" id="zipcode" name="zipcode" value="<?=$zipcode?>"> <input type="text" class="form-control" id="zipcode" name="zipcode" value="<?= $zipcode ?>">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="form-check"> <div class="form-check">
<label class="form-check-label"> <label class="form-check-label">
<?=$account_message?> <?= $account_message ?>
</label> </label>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-9"> <div class="form-group col-md-9">
</div> </div>
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<button type="submit" class="btn btn-primary">Add Patient</button> <button type="submit" class="btn btn-primary">Add Patient</button>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xxl-4 m-b-30"> <div class="col-xxl-4 m-b-30">
<div class="card card-statistics h-100 mb-0"> <div class="card card-statistics h-50 mb-0">
<div class="card-header d-flex justify-content-between"> <div class="card-header d-flex justify-content-between">
<div class="card-heading"> <div class="card-heading">
<h4 class="card-title">New Patient Link ID</h4> <h4 class="card-title">New Patient Link ID</h4>
@@ -125,58 +125,40 @@
</div> </div>
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="card-body"> <div class="card-body">
<form method="POST" name="linkform" action="#"> <form name="linkform">
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<label for="inputEmail4">Enter Link ID</label> <label for="inputLinkID">Enter Link ID</label>
<input type="text" class="form-control" id="firstname" name="firstname" value="<?=$firstname?>" placeholder="Link ID : WE34RTH587"> <input type="text" class="form-control" id="patient_link_id" name="patient_link_id" value="<?= isset($patient_link_id) ? $patient_link_id : '' ?>" placeholder="Link ID : WE34RTH587">
</div> </div>
</div> </div>
<div class="form-group">
<div class="form-check">
<label class="form-check-label">
<?=$account_message?>
</label>
</div>
</div>
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-9"> <div class="form-group col-md-9">
<div id="link_result">[]</div>
</div> </div>
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<button type="submit" class="btn btn-primary" onclick="Show_Alert('My_Input_Text')">Add Patient</button> <button type="submit" id="link_submit" class="btn btn-primary" onclick="return connectLinkID()">Link Patient</button>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<script type="text/javascript">
<!--
function Show_Alert(Input_Id) {
var My_Message = document.getElementById(Input_Id).value;
alert('Hello, ' + My_Message);
}
// -->
</script>
</div> </div>
</div> </div>
</div>
<div class="col-xxl-4 m-b-30"> </div>
<div class="col-xxl-4 m-b-30">
<? include 'application/views/provider/components/patient_listing.php'; ?> <? include 'application/views/provider/components/patient_listing.php'; ?>
</div> </div>
@@ -186,42 +168,7 @@ function Show_Alert(Input_Id) {
<!-- end row -->
<!-- event Modal -->
<div class="modal fade" id="eventModal" tabindex="-1" role="dialog" aria-labelledby="verticalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="verticalCenterTitle">Add New Event</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="modelemail">Event Name</label>
<input type="email" class="form-control" id="modelemail">
</div>
<div class="form-group">
<label>Choose Event Color</label>
<select class="form-control">
<option>Primary</option>
<option>Warning</option>
<option>Success</option>
<option>Danger</option>
</select>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-success">Save changes</button>
</div>
</div>
</div>
</div>
</div> </div>
<!-- end container-fluid --> <!-- end container-fluid -->
</div> </div>
@@ -230,3 +177,38 @@ function Show_Alert(Input_Id) {
<!-- end app-container --> <!-- end app-container -->
<!-- begin footer --> <!-- begin footer -->
<script type="text/javascript">
<!--
function connectLinkID() {
var patient_link_id = document.linkform.patient_link_id.value;
if (patient_link_id == '' || !isEmail(patient_link_id)) {
alert('You must enter valid linkID to continue!');
return false;
}
// alert(job_description);
$('#link_result').html('Processing...');
$('#link_submit').prop('disabled', true);
$.ajax({
url: "/patient/linkpatient?patient_link_id=" + patient_link_id
}).done(function (data) {
$('#link_result').html(data);
document.offer_individual.rec_email.value = '';
$('#link_submit').prop('disabled', false);
});
return false;
}
function Show_Alert(Input_Id) {
var My_Message = document.getElementById(Input_Id).value;
alert('Hello, ' + My_Message);
}
// -->
</script>
@@ -179,7 +179,7 @@
</div> </div>
</div> </div>
<div class="card-body"> <div class="card-body">
<form method="POST" action="/patient/"> <form method="POST" action="/patient/">
@@ -190,19 +190,17 @@
</div> </div>
<div class="form-row"> <div class="form-row">
<button type="submit" class="btn btn-primary">Attach Record to Patient App</button>
<button type="submit" class="btn btn-primary">Attach Record to patient App</button>
</div> </div>
</form> </form>
<ul class="activity"> <ul class="activity">
<li class="activity-item success"> <li class="activity-item success">
<div class="activity-info"> <div class="activity-info">
<h5 class="mb-0"> Complete milestone 3 and update. </h5> <h5 class="mb-0"> Complete milestone 3 and update. </h5>
@@ -211,8 +209,8 @@
</span> </span>
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>