Personal tools
You are here: Home / OSCAR Users / EMR and Case Management Resources / eForms / eForms in development/beta testing / Useful Code / The use of measurements with non matched names and ids for extended use of inputs
Navigation
 

The use of measurements with non matched names and ids for extended use of inputs

When creating an input that pushes measurements to OSCAR if the name= and the id= are not the same more manipulation of the input data can occur - see the explanation in the text file

Plain Text icon help with measurements ids and push and pull.txt — Plain Text, 2 kB (2320 bytes)

File contents

I was trying to get an input which pushes and pulls a measurement to
also be the subject of an eform so it is easy to see what it was for
later (when you hover over an eform the subject comes up).  Like if
you ordered an obstetrical ultrasound with an imaging form and you
used the field where you said "obstetrical ultrasound" to name the
subject so months later you could see it wasn't a chest XRay just by
hovering over it.  Anyways, using the code Peter gave us:

<textarea name="Test" id="Test" class="noborder"
style="position:absolute; left:11px; top:276px; width:730px;
height:193px; font-family:sans-serif; font-style:normal;
font-weight:normal; font-size:24px; text-align:left;
background-color:white;" onchange="subject.value=Test.value;"
></textarea>

you can use onchange (or onblur more on this another time) to name the
subject using another input.  Trouble is - it doesn't work well with
the identifiers we use for measurements.  The trick is - the "name="
part is what pushes the measurement back to OSCAR, but the "id=" part
isn't, and it doesn't have to be the same as the name.  Soooo - if for
instance you have a consent form where the procedure is what you want
in the subject line, and you happen to use procedure as a measurement
so you can fill out other forms like the booking form and the
bloodwork form with the same value, you can have a line like:

<textarea name="m$PROC#value" id="PROC" class="noborder"
style="position:absolute; left:29px; top:324px; width:710px;
height:72px; font-family:sans-serif; font-style:normal;
font-weight:normal; font-size:14px; text-align:left;
text-decoration:underline; background-color:white;"
oscarDB=m$PROC#value  onblur="subject.value=PROC.value;"></textarea>

and

                 Subject: <input name="subject" size="40" type="text" oscarDB=m$PROC#value>

Which will push and pull the procedure value in the procedure line,
pull the procedure into the subject line, AND fill in the subject line
if either you change the procedure, or it wasn't pre defined and you
entered it for the first time on your consent form.  Basically you do
things with inputs that are measurements simply by not having the
input id match the input name.

Hope this wasn't all just babble, and some of you find this helpful. JohnR.

Document Actions

 

Download button

DOWNLOAD OSCAR FOR TESTING

 

eForms button

DOWNLOAD SHARED E-FORMS


 Customize button

FIND PLUG-INS AND TWEAKS
FOR YOUR OSCAR EMR

 

Subscribe Button

SUBSCRIBE TO DISCUSSION LIST 
(SEE ALL LISTS)

  

Help button

ACCESS THE ONLINE MANUALS
(PAID SUPPORT)