I am working WITHIN an electronic medical record (oscar (freeware))
I am trying to write a simple appointment letter which takes the Oscar generated appointment start time and date and then brings t in t a letter to the patient
It work fine...ie it collects the correct data and writes a letter.
HOWEVER at present it returns the date like this 2017-07-31
That I want is for it to say Monday 31 July 2017
Forgive the coding if it defies convention but here is the code so far. A lot of this is oscar specific for fax controls etc and it works. It is just that date that I am struggling with
<html>
<head>
<title>Appointment time</title>
<style type="text/css" media="print">
.DoNotPrint {
display: none;
}
.noborder {
border : 0px;
background: transparent;
scrollbar-3dlight-color: transparent;
scrollbar-3dlight-color: transparent;
scrollbar-arrow-color: transparent;
scrollbar-base-color: transparent;
scrollbar-darkshadow-color: transparent;
scrollbar-face-color: transparent;
scrollbar-highlight-color: transparent;
scrollbar-shadow-color: transparent;
scrollbar-track-color: transparent;
background: transparent;
overflow: hidden;
}
</style>
<script type="text/javascript" src="${oscar_javascript_path}jquery/[login to view URL]"></script>
<script type="text/javascript" src="${oscar_javascript_path}eforms/[login to view URL]"></script>
<script type="text/javascript" src="${oscar_javascript_path}eforms/[login to view URL]"></script>
<script type="text/javascript" src="${oscar_javascript_path}eforms/[login to view URL]"></script>
<script type="text/javascript">if (typeof jQuery != "undefined" && typeof signatureControl != "undefined") {jQuery(document).ready(function() {[login to view URL]({eform:true, height:27, width:110, top:696, left:486});});}</script>
<script language="javascript">
function formPrint(){
[login to view URL]();
}
</script>
<!-- scripts to confirm closing of window if it hadn't been saved yet -->
<script language="javascript">
//keypress events trigger dirty flag
var needToConfirm = false;
document.onkeyup=setDirtyFlag;
function setDirtyFlag(){
needToConfirm = true;
}
function releaseDirtyFlag(){
needToConfirm = false; //Call this function if doesn't requires an alert.
//this could be called when save button is clicked
}
[login to view URL] = confirmExit;
function confirmExit(){
if (needToConfirm){
return "You have attempted to leave this page. If you have made any changes to the fields without clicking the Save button, your changes will be lost. Are you sure you want to exit this page?";
}
}
</script>
<script language="JavaScript">
[login to view URL](0,0);
if ([login to view URL]) {
[login to view URL]([login to view URL],[login to view URL]);
}
else if ([login to view URL]||[login to view URL]) {
if ([login to view URL]<[login to view URL]||[login to view URL]<[login to view URL]){
[login to view URL] = [login to view URL];
[login to view URL] = [login to view URL];
}
}
</script>
</head>
<body>
<div style="text-align: center;">Dr H L AVERNS Consultant
Rheumatologist<br>
</div>
<br>
<div style="text-align: right;">190 Wellington
St <br>
Kingston<br>
Ontario<br>
K7L 3E4<br>
<br>
<div style="text-align: left;"><br>
<textarea name="label" id="label" class="noborder" style="position:absolute; left:12px; top:80px; width:297px; height:105px; font-family:sans-serif; font-style:normal; font-weight:normal; font-size:12px; text-align:left; border:none; background-color:transparent;" oscarDB=label></textarea>
<br><br>
Dear <input type="text" name="patient_fullname_auto_text" style="border:none; background-color:transparent;" oscarDB=patient_name><br>
<br>
<div style="text-align: left;">
<p class="MsoNormal"><b style=""><span
style="font-family: "Arial","sans-serif";"><span
style="font-family: Times New Roman,Times,serif;"></span><o:p></o:p></span></b></p>
<p class="MsoNormal"><u><span
style="font-family: "Arial","sans-serif";"><o:p></o:p></span></u></p>
<p class="MsoNormal"><span
style="font-size: 12pt; line-height: 100%; font-family: "Arial","sans-serif";"><span
style=""></span><span style=""></span><span
style=""></span><span style=""></span><o:p></o:p></span></p>
</div>
<p style="text-align: left;">An appointment has been made
for you to see Dr Averns in his rheumatology clinic on:</p>
<input type="text" name="appt_date" style="font-weight:bold; border:none;" oscarDB=appt_date><br>
<div name="time_from_db" id="time_from_db" hidden oscarDB=appt_starttime></div>
<input name="custom_date_time" id="custom_date_time" type="text" class="noborder" style="position:absolute;font-weight:bold;border:none;... trimmed for brevity
<p style="text-align: left;"><br><br>We are located at: 190
Wellington St, Quarry Medical Building, 3rd Floor. </p>
<p style="text-align: left;">PLEASE CALL OR EMAIL TO
CONFIRM THAT YOU ARE ABLE TO ATTEND AT THE TIME AND DATE ALLOCATED. IF
WE DO NOT HAVE CONFIRMATION WITHIN 3 DAYS OF THE APPOINTMENT IT WILL BE
CANCELLED. <br>
<br>
For this appointment your initial assessment will be performed by
either a resident or one of our rheumatology therapists. You will also
be seen by Dr. Averns once the preliminary assessment is complete. You
should expect to be in the clinic for a minimum of an hour. <br>
<br>
You will require: <br>
1. A valid health card- we cannot see you without one <br>
2. Bring or provide a complete list of all medications (including dose
and frequency) and allergies <br>
<br>
If you have internet access, please complete the New Patient
Questionnaire which you will find on our website under the menu item
"Preparing for your Appointment". This can either be submitted/emailed
(info@[login to view URL]) to us or you can print it out and bring it with
you. If you do not have internet do not worry- we will collect the
information when you arrive. <br>
<br>
There is parking for patients with disability permits adjacent to the
front doors (subject to availability) and the building has an elevator.
Please visit our website at [login to view URL] for a map and parking
locations. <br>
<br>
IMPORTANT<br>
If you confirm and fail to attend your appointment you will not be
offered another appointment. You will need to see either your referring
doctor and be re-referred on a routine basis, or be referred to a
different office. Please arrive on time, if you arrive more than 10
minutes late for your appointment you will be asked to reschedule because the alternative is for every patent for the rest of the day to be seen late..
</p>
<br>
<p style="text-align: left;"><br>
</p>
<p style="text-align: left;">Yours sincerely <br>
</p>
<br>
<p style="text-align: left;"><br>
</p>
Receptionist to Dr H Averns<br>
<br>
</div>
</div>
<input name="today" id="today" type="text" class="noborder" style="position:absolute; left:800px; top:110px; width:150px; height:26px; font-family:sans-serif; font-style:normal; font-weight:normal; font-size:12px; text-align:left; border:none; background-color:transparent;" oscarDB=today>
<div id="signatureDisplay"></div><input type="hidden" name="signatureValue" id="signatureValue" value="" ></input>
<div class="DoNotPrint" style="position: absolute; top:971px; left:0px;" id="BottomButtons" >
<table><tr><td>
Subject: <input name="subject" size="40" type="text">
<input value="Submit" name="SubmitButton" id="SubmitButton" type="submit" onclick=" releaseDirtyFlag();">
<input value="Reset" name="ResetButton" id="ResetButton" type="reset">
<input value="Print" name="PrintButton" id="PrintButton" type="button" onclick="formPrint();">
<input value="Print & Submit" name="PrintSubmitButton" id="PrintSubmitButton" type="button" onclick="formPrint();releaseDirtyFlag();setTimeout('[login to view URL]()',1000);">
</td></tr></table>
<div id="attachment-control"></div><input id="attachment-control-printables" name="attachment-control-printables" type="hidden"> </div>
</form>
<script>
var d = [login to view URL]("time_from_db").getAttribute('value');
[login to view URL]("custom_date_time").value = [login to view URL](0, 5);
</script>
</body>
</html>