Personal tools
You are here: Home / OSCAR EMR 12.x / 2.0 Clinical Functions / 2.5 eForms / 2.5.4 eForm Magic

2.5.4 eForm Magic

Advanced techniques for making eForms in Oscar 12_1 Including Database pulls - simple, measurements, enhanced and extended as well as Templates to paste into ...

Pulling Data from Oscar

a. Standard Database Tags

 The following tags from Oscar12_1 are designed for users to use if they want certain fields to be automatically filled out with information from the patient's chart.

The tag should appear in the following style oscarDB=<tag> (note lack of quotation marks) as in the following example:

<input type="text" name="pname" id="pname" oscarDB=patient_name>

The following is a list of all the standard database tags available

(*1) indicates tags added as at March 24,2015

oscarDB tag Description Example
today system date
2013-01-29
time (*) system time
10:45:02
appt_date appointment date
2012-12-11
current_form_id (*1) fid of current eform
number
current_form_data_id (*1) fdid of current eform
number
current_user logged in user
Hutten-Czapski, Peter
current_user_fname_lname (*) logged in user
Peter Hutten-Czapski
current_user_ohip_no OHIP provider No
150692
current_user_specialty_code OHIP specialty
00
current_user_cpsid College Registration
54345
current_user_id Oscar User No
121
current_user_signature (*1) Oscar User Signature
MD (entered from Pref, Edit your Signature)
current_user_address (*) users address
293 Meridian, Haileybury
current_user_phone (*) user's phone
705-672-1111
current_user_workphone (*) user's work phone
705-672-2222
current_user_fax (*) user's fax
705-672-3333
current_user_team (*) user's team
KME
patient_name Upper Case Name
MACDONALD, JOHN A
first_last_name Mixed Case Name
John a Macdonald
patient_nameL (1) Last Name
MACDONALD
patient_nameF (1) First Name
JOHN A
patient_alias (1*) alias
snoopy
patient_id Oscar Generated Demographic No
3781
label SURNAME, PROPER
Address line
Telephones
DOB HIC
MACDONALD, JOHN A
Box 815, 16 Whitewood Ave., New Liskeard, ON P0J 1P0
Tel:705-647-4399(H)  (W)
03/06/1938(F)  HIN:7999962999CR
address Address
City Postal
Box 815, 16 Whitewood Ave.
New Liskeard, ON P0J 1P0
addressline one line address
Box 815, 16 Whitewood Ave., New Liskeard, ON P0J 1P0
address_street_number_and_name street and number
Box 815, 16 Whitewood Ave.
province 2 digit province
ON
city City
New Liskeard
postal Postal Code
P0J 1P0
dob date of birth
03/06/1938 (d/m/y)
dobc dd/mm/yyyy
03/06/1938
dobc2 yyyy/mm/dd
1938/06/03
dob_year yyyy
1938
dob_month mm
06
dob_day dd
03
NameAddress Name
Address
MACDONALD, JOHN A
Box 815, 16 Whitewood Ave., New Liskeard, ON P0J 1P0
hin HIN and Version
7999962999 CR
hinc HIN
7999962999
hinversion Version Code
CR
hc_renew_date Health Card Renewal
2006-01-23
chartno User provided Chart No
eg the paper chart #
29973
phone home phone
705-647-4399
phone2 work phone
705-647-4399
cell cell phone
705-647-4399
phone_extension extension
23
phone2_extension extension
23
age Age in years
74
ageComplex Age expressed in days weeks or months for infants and toddlers and years  for older children or adults
74 year old
sex gender
M
sin (*1) Social Security Number
111-222-333
medical_history history
1984ANTEROLATERAL MYOCARDIAL INFARCT
2000 COPD
2001 ATYPICAL PNEUMONIA
2002 OSTEOPENIA
2007 CATARACT REMOVAL & IOL IMPLANT(Right)
2008 CVA (CEREBROVASCULAR)(Right)
other_medications_history family history and other meds
dad renal failure 76 IHD, mom AMI 75 NIDDM
social_family_history social history
Lives with son Michael, Retired
ongoingconcerns ongoing concerns
Limited finances
reminders reminders
Findlay's, If unable to reach patient at home tel #, contact Mike (caretaker) at 705-676-7995(cell).
risk_factors_json (*1) risk factors
Risk Factors from CPP
family_history_json (*1) family history
Family History from CPP
dxregistry Comma delineated disease registry items
ESSENTIAL HYPERTENSION*, CHRONIC BRONCHITIS*
OHIPdxCode Comma delimited OHIP diagnosis codes billed
715,919,300,366,896,401,610,381,799,380,493,388,491,454,386,691,780
allergies_des allergies and
archived (deleted)
PENICILLIN
archived allergies: AMOXIL
allergies_des_no_archived current allergies
PENICILLIN
recent_rx recent Rx
2012-11-12 AGGRENOX Take 1 Tabs PO BID for 90 Days LU Code: 349 Qty:180 Repeats:3
2012-11-08 MUCOMYST INJ 200MG/ML 2 ml by nebuliser TID for 30 days Qty:90 ml Repeats:4
2012-10-31 PULMICORT NEBUAMP 0.5 MG/ML inhale contents of 1 nebule BID for 60 days LU Code: 264 Qty:120 Repeats:0
SALBUTAMOL  1MG LIQUID Take 1 neb qid for 90 days Qty:360 Repeats:3
IPRATROPIUM BROMIDE .25MG SOLUTION 1 neb Q6H for 90 days Qty:360 Repeats:3
SALBUTAMOL  100MCG METERED-DOSE AEROSOL 1-2puff QID INH PRN for 30 days Qty:2 Repeats:12
today_rx todays Rx
2012-11-12 AGGRENOX Take 1 Tabs PO BID for 90 Days LU Code: 349 Qty:180 Repeats:3
druglist_generic Generic drug list one per line
ACETYLSALICYLIC ACID 25.0 MG DIPYRIDAMOLE 200.0 MG 1 BID
ACETYLCYSTEINE 0 TID
SALBUTAMOL (SALBUTAMOL SULFATE) 0 QID prn
IPRATROPIUM BROMIDE 0 Q6H
SALBUTAMOL (SALBUTAMOL SULFATE) 1 qid
BETAHISTINE HYDROCHLORIDE 16.0 MG 1 TID
FUROSEMIDE 20.0 MG 1 OD
druglist_trade Trade drug list one per line
AGGRENOX 1 BID
MUCOMYST INJ 200MG/ML 0 TID
VENTOLIN  100MCG METERED-DOSE AEROSOL 0 QID prn
ATROVENT .25MG SOLUTION 0 Q6H
VENTOLIN  1MG LIQUID 1 qid
NOVO-BETAHISTINE 16MG 1 TID
LASIX 20 TAB 1 OD
druglist_line the shortest druglist comma separated
Aggrenox 1 BID, Mucomyst inj 200mg/ml 0 TID, Salbutamol  100mcg metered-dose aerosol 0 QID prn, Ipratropium bromide .25mg solution 0 Q6H, Salbutamol  1mg liquid 1 qid, Novo-betahistine 16mg 1 TID, Furosemide 20 tab 1 OD
onGTPAL (*1) Ontario Antenatal Record GTPAL code
GxTxPxAxLx
onEDB (*1) Ontario Antenatal Record EDB
2014-12-31
bcGTPAL (*1) British Columbia Antenatal Record GTPAL code
GxTxPxAxLx
bcEDD (*1) British Columbia Antenatal Record EDD
2014-12-31
doctor Last, First of doctor listed by Oscar in demographics
Hutten-Czapski, Peter
doctor_provider_no (*1) Provider number
1007
doctor_ohip_no Their billing number
150692
doctor_specialty_code Their specialty
00
doctor_cpsid Their CPSID
54345
doctor_title (*1) Their Title
MD (this column is in the database but not editable)
provider_name Last, First
Hutten-Czapski, Peter
provider_name_first_init Name
P. Hutten-Czapski
doctor_work_phone work no
705-672-1111
doctor_signature (*1) Their signature
MD
referral_name Last, First
SPADE, SAM
(These come from the ProfessionalSpecialists table using the ReferralNo)
referral_address Multiline address
431 Whitewood Ave
New Liskeard ON P0J 1P0
referral_phone Referral phone
(705) 647-1112 Ext 5422
referral_fax Fax no
705-647-1234
bc_referral_name (*1) Last, First
SPADE, SAM
(These come from the billingreferral table using the ReferralNo)
bc_referral_address (*1) Multiline address
431 Whitewood Ave
New Liskeard ON P0J 1P0
bc_referral_phone (*1) Referral phone
(705) 647-1112 Ext 5422
bc_referral_fax (*1) Fax no
705-647-1234
bc_referral_no (*1) Referring MD no
666666
appt_provider_name Appointment
Hutten-Czapski, Peter
appt_provider_id Oscar appt provider number
121
appt_no number
147227
clinic_name name
Haileybury Family Health Team
clinic_phone As per admin
705-672-1111
clinic_fax As per admin
705-672-2222
clinic_label Multiline name and address
Haileybury Family Health Team
2913 Meridian
Haileybury,Ontario,P0J 1P0
Tel:672-1111Fax:705-672-2222
clinic_addressLine Street
2913 Meridian
clinic_addressLineFull Street, City, Province, Postal
2913 Meridian, Haileybury, Ontario, P0J 1K0
clinic_address Multiline
Note bug in where the P0J 1K0 goes
2913 Meridian
Haileybury,P0J 1P0
Ontario,Canada
clinic_city city Haileybury
clinic_province province
Ontario
clinic_postal postal
P0J 1K0
dtap_immunization_date dtap immunisation date
2002-11-19
flu_immunization_date flu shot date
2002-11-19
fobt_immunization_date fobt date
2002-11-19
mammogram_immunization_date mammo date
2002-11-19
pap_immunization_date pap date
2002-11-19
cytology_no (*1) cytology number
number (from demographicExt table where key = 'cytolNum')
guardian_label from new relationships tables
first last
address
city province
postal

MIKE MACDONALD
431 Whitewood Ave
New Liskeard ON
P0J 1P0
guardian_label2 Substitute Decision Maker
first last
address
city province
postal
MIKE MACDONALD
431 Whitewood Ave
New Liskeard ON
P0J 1P0
email (*1) patient email
my.name@oscarcanada.org

b. Measurements

Measurements can be retrieved from the chart as well.  The format is  oscarDB=m$<measurementName>#<measurementField>.  For most uses you are interested in the "value" measurement Field which will give you the latest measurement of that type (the types configured vary by system, the examples are ones that are common to most if not all Oscar installations)

<input type="text" name="WT" id="WT" oscarDB=m$WT#value>

And comments associated with that measurement

<input type="text" name="EGFR" id="EGFR" oscarDB=m$EGFR#comments>

the date of the Measurement can be pulled by

<input type="text" name="dailySmokes" id="dailySmokes" oscarDB=m$NOSK#dateObserved>
Measurements can be saved from the form to the measurements list by using m$<measurementName>#<measurementField> as the name of the input
WT: <input class="nodisplay" type="text" name="m$WT#value" />
<select name="m$WT#measuringInstruction">
        <option value="in kg">in kg</option>
        <option value="in BMI">in BMI</option>
        </select>
Comments: <textarea class="nodisplay" name="m$WT#comments" rows="3" cols="20"></textarea>

If you want to both read from and write to the measurements database combine the two methods

<input type="text" name="m$BP#dateObserved" oscarDB=m$BP#dateObserved>

The name of each text field and checkbox MUST be unique.  The information WILL NOT SAVE if there are duplicate names.

The following measurements are standard for Oscar 12_1 Build 76 and later, although may be in earlier builds depending on your OSP

tag typeDisplayName typeDescription validation
02 Oxygen Saturation Oxygen Saturation Numeric Value: 0 to 100
24UA 24 hour urine albumin 24 hour urine albumin Numeric Value greater than or equal to 0
24UR 24-hr Urine cr clearance & albuminuria Renal 24-hr Urine cr clearance & albuminuria Numeric Value: 0 to 50
5DAA 5 Day Adherence if on ART 5 Day Adherence if on ART Numeric Value: 0 to 100
A1C A1C A1C Numeric Value: 0 to 50
AACP Asthma Action Plan Asthma Action Plan Yes/No/NA
ACOS Asthma Coping Strategies Asthma Coping Strategies Yes/No/NA
ACR Alb creat ratio ACR Numeric Value: 0 to 300
ACS Acute Coronary Syndrome Acute Coronary Syndrome Yes/No/X
AEDR Asthma Education Referral Asthma Education Referral Yes/No/NA
AELV Exacerbation since last visit requiring clinical evaluation Exacerbation since last visit requiring clinical evaluation Yes/No/NA
AENC Asthma Environmental Control Asthma Environmental Control Yes/No/NA
AHGM Anit-hypoglycemic Medication Anit-hypoglycemic Medication Yes/No/X
AIDU Active Intravenous Drug Use Active Intravenous Drug Use Yes/No/X
ALC Alcohol Alcohol Yes/No/NA
ALPA Asthma Limits Physical Activity Asthma Limits Physical Activity Yes/No/NA
ALT ALT ALT Numeric Value: 0 to 300
Ang Angina Angina Yes/No/X
ANR Asthma Needs Reliever Asthma Needs Reliever Numeric Value greater than or equal to 0
ANSY Asthma Night Time Symptoms
Asthma Night Time Symptoms
Numeric Value greater than or equal to 0
AORA ACE-I OR ARB ACE-I OR ARB Yes/No/X
ARAD Review Asthma Definition Review Asthma Definition Yes/No/NA
ARDT Asthma Review Device Technique optimal Asthma Review Device Technique optimal Yes/No/NA
ARMA Asthma Review Med Adherence Asthma Review Med Adherence Yes/No/NA
ASAU ASA Use ASA Use Yes/No/X
ASPR Asthma Specialist Referral Asthma Specialist Referral Yes/No/NA
AST AST AST Numeric Value: 0 to 100
ASTA Asthma Trigger Avoidance Asthma Trigger Avoidance Yes/No/NA
ASWA Asthma Absence School Work Asthma Absence School Work Yes/No/NA
ASYM Asthma Symptoms Asthma Symptoms Numeric Value greater than or equal to 0
BCTR Birth Control Birth Control Yes/No/NA
BG Blood Glucose Blood Glucose Yes/No/X
BMED Blood Pressure Medication Changes BP Med Changes Yes/No/X
BMI Body Mass Index BMI Numeric Value: 0 to 100
BP BP Blood Pressure Blood Pressure
BP BP Blood Pressure Blood Pressure
BP BP Blood Pressure Blood Pressure
BP BP Blood Pressure Blood Pressure
CASA Consider ASA Consider ASA Yes/No/X
CD4 CD4 CD4 Numeric Value greater than or equal to 0
CD4P CD4 Percent CD4 Percent Numeric Value: 0 to 100
CDMP Attended CDM Self Management Program Attended CDM Self Management Program Yes/No/NA
CEDE Education Exercise Education Exercise Yes/No/X
CEDM Education Patient Meds Education Patient Meds Yes/No/X
CEDS Education Salt fluid Education Salt fluid Yes/No/X
CEDW Education Daily Weight Monitoring Education Daily Weight Monitoring Yes/No/X
CERV ER visits for HF ER visits for HF Numeric Value: 0 to 10
CGSD Collaborative Goal Setting Collaborative Goal Setting Yes/No/X
CIMF Child Immunization recall Child Immunization Follow up No Validations
CMVI CMV IgG CMV IgG Yes/No/X
CODC COD Classification COD Classification No Validations
COPE Provide COP Education Materials Provide COP Education Materials Yes/No/NA
COPM Review COP Med use and Side effects Review COP Med use and Side effects Yes/No/NA
COPS COP Specialist Referral COP Specialist Referral Yes/No/NA
COUM Warfarin Weekly Dose Warfarin Dose Numeric Value: 0 to 300
CRCL Creatinine Clearance Creatinine Clearance Numeric Value: 0 to 300
CVD CVD Cerebrovascular disease Yes/No/X
CXR CXR CXR Yes/No/X
DARB ACE AARB ACE AARB Yes/No/NA
DEPR Depression Depression Yes/No/NA
DESM Dental Exam Every 6 Months Dental Exam Every 6 Months Yes/No/X
DiaC Diabetes Counselling Given Diabetes Counselling Given Yes/No/X
DIER Diet and Exercise Diet and Exercise Yes/No/X
DIET Diet Diet Yes/No/NA
DIFB Impaired FB Impaired FB Yes/No/NA
DIGT Impaired GT Impaired Glucose Tolerance Yes/No/NA
DM DM Diabetes Yes/No/X
DMED Diabetes Medication Changes DM Med Changes Yes/No/X
DMME Diabetes Education Diabetes Education Yes/No/X
DMSM Diabetes Self Management Goals Diabetes Self Management Goals Yes/No/NA
DOLE Date of last Exacerbation Date of last Exacerbation Date
DpSc Depression Screen Feeling Sad, blue or depressed for 2 weeks or more Yes/No/X
DRCO Drug Coverage Drug Coverage Yes/No/X
DRPW Drinks per Week Drinks per Week Numeric Value: 0 to 300
DT1 Type I Diabetes Type 1 Yes/No/NA
DT2 Type II Diabetes Type 2 Yes/No/NA
DTYP Diabetes Type Diabetes Type Integer: 1 to 3
ECG ECG ECG Yes/No/NA
EDC EDC Expected Date of Confinement Date
EDDD Education Diabetes Education Diabetes Yes/No/X
EDF EDF Erectile Dysfunction Yes/No/X
EDGI Autonomic Neuropathy Autonomic Neuropathy Yes/No/X
EDND Education Nutrition Diabetes Education Nutrition Diabetes Yes/No/X
EDNL Education Nutrition Lipids Education Nutrition Lipids Yes/No/X
EGFR EGFR EGFR Numeric Value: 0 to 300
EPR Exacerbation plan in place or reviewed Exacerbation plan in place or reviewed Yes/No/NA
EXE Exercise Exercise Yes/No/NA
ExeC Exercise Counselling Given Exercise Counselling Given Yes/No/X
Exer Exercise Exercise Numeric Value greater than or equal to 0
EYEE Dilated Eye Exam Eye Exam Yes/No/X
FAHS Risk of Falling Risk of Falling Yes/No/NA
FBPC 2 hr PC BG 2 hr PC BG Numeric Value: 0 to 50
FBS FBS Glucose FBS Numeric Value: 0 to 50
FEET FEET Feet Check skin Yes/No/NA
FEET FEET Feet Check skin Yes/No/NA
FEET FEET Feet Check skin Yes/No/NA
FEET FEET Feet Check skin Yes/No/NA
FEET FEET Feet Check skin Yes/No/NA
FEV1 Forced Expiratory Volume 1 Second Forced Expiratory Volume 1 Second Numeric Value greater than or equal to 0
FGLC Fasting Glucose meter , lab comparison Fasting glucose meter, lab comparison Yes/No/X
FICO Financial Concerns Financial Concerns Yes/No/X
FLUF Flu Recall Flu Recall Documentation No Validations
FOBF FOBT prevention recall FOBT Immunization Follow up No Validations
FRAM Framingham 10 year CAD Framingham 10 year CAD No Validations
FTE Foot Exam Foot Exam Yes/No/X
FTEx Foot Exam: Significant Pathology Significant Pathology Yes/No/X
FTIn Foot Exam: Infection Infection Yes/No/X
FTIs Foot Exam: Ischemia Ischemia Yes/No/X
FTLS Foot Exam Test loss of Sensation Foot Exam Loss of Sensation Yes/No/X
FTNe Foot Exam: Neuropathy Neuropathy Yes/No/X
FTOt Foot Exam: Other Vascular abnormality
Other Vascular abnormality
Yes/No/X
FTRe Foot Exam: Referral made Referral made Yes/No/X
FTST Free Testost Free Testosterone Numeric Value greater than or equal to 0
FTUl Foot Exam: Ulcer Ulcer Yes/No/X
G6PD G6PD G6PD Yes/No/X
Hb Hb Hb Numeric Value: 0 to 300
HIP Hip Circ. Hip Circumference Numeric Value greater than or equal to 0
Hchl Hyper cholesterolemia
Hyper cholesterolemia
Yes/No/X
HDL HDL High Density Lipid Numeric Value: 0 to 10
HEAD Head circumference Head circumference Numeric Value: 0 to 100
HFCG HF Collaborative Goal Setting HF Collaborative Goal Setting Yes/No/X
HFCS HF Self Management Challenge HF Self Management Challenge Yes/No/X
HFMD HF Mod Risk Factor Diabetes HF Mod Risk Factor Diabetes Yes/No/X
HFMH HF Mod Risk Factor Hyperlipidemia HF Mod Risk Factor Hyperlipidemia Yes/No/X
HFMO HF Mod Risk Factor Overweight HF Mod Risk Factor Overweight Yes/No/X
HFMS HF Mod Risk Factor Smoking HF Mod Risk Factor Smoking Yes/No/X
HFMT HF Mod Risk Factor Hypertension HF Mod Risk Factor Hypertension Yes/No/NA
HIVG HIV genotype HIV genotype Yes/No/X
HLA HLA B5701 HLA B5701 Yes/No/X
HpAI Hep A IgG Hep A IgG Yes/No/X
HpBA Hep BS Ab Hep BS Ab Yes/No/X
HPBC Hep B CAb Hep B CAb Yes/No/X
HPBP Hep B PCR Hep B PCR Yes/No/X
HpBS Hep BS Ag Hep BS Ag Yes/No/X
HpCA Hep C Ab Hep C Ab Yes/No/X
HPCG Hep C Genotype Hep C Genotype Numeric Value: 0 to 7
HPCP Hep C PCR Hep C PCR Yes/No/X
HRMS Review med use and side effects HTN Review of Medication use and side effects No Validations
HSMC Self Management Challenges HTN Self Management Challenges No Validations
HSMG Self Management Goal HTN Self Management Goal No Validations
HT HT Height Numeric Value: 0 to 300
HTN HTN Hypertension Yes/No/X
HYPE Hypoglycemic Episodes Number of Hypoglycemic Episodes Numeric Value: 0 to 50
HYPM Hypoglycemic Management Hypoglycemic Management Yes/No/X
IART Currently On ART Currently On ART Yes/No/X
iDia Eye Exam: Diabetic Retinopathy Diabetic Retinopathy Yes/No/X
iEx Eye Exam: Significant Pathology Significant Pathology Yes/No/X
iHyp Eye Exam: Hypertensive Retinopathy Hypertensive Retinopathy Yes/No/X
INR INR INR Numeric Value: 0 to 300
INSL Insulin Insulin Yes/No/NA
iOth Eye Exam: Other Vascular Abnormality
Other Vascular Abnormality Yes/No/X
iRef Eye Exam: Referral Made Referral Made Yes/No/X
JVPE JPV Elevation JPV Elevation Yes/No/X
Kpl Potassium Potassium Numeric Value: 0 to 10
LcCt Locus of Control Screen Feeling lack of control over daily life Yes/No/X
LDL LDL Low Density Lipid Numeric Value: 0 to 10
LEFP LEFS Pain Lower Extremity Functional Scale - Pain Numeric Value: 0 to 300
LETH Lethargy Lethargic Yes/No/NA
LHAD Lung Related Hospital Admission Lung Related Hospital Admission Yes/No/NA
LMED Lipid Lowering Medication Changes Lipid Med Changes Yes/No/X
LMP Last Menstrual Period LMP Date
LUCR Lung Crackles Lung Crackles Yes/No/X
MACA Macroalbuminuria Renal Microalbuminuria
Numeric Value: 0 to 50
MACC MAC culture MAC culture Yes/No/X
MAMF MAM Recall Mammogram Recall Documentation No Validations
MCCE Motivation Counselling Completed Exercise Motivation Counselling Completed Exercise Yes/No/X
MCCN Motivation Counselling Completed Nutrition Motivation Counselling Completed Nutrition Yes/No/X
MCCO Motivation Counselling Completed Other Motivation Counselling Completed Other Yes/No/X
MCCS Motivation Counselling Completed Smoking Cessation Motivation Counselling Completed Smoking Cessation Yes/No/X
MedA Medication adherence access barriers Difficulty affording meds or getting refills on time Yes/No/X
MedG Medication adherence general problem Any missed days or doses of meds Yes/No/X
MedN Medication adherence negative beliefs Concerns about side effects or medication is not working Yes/No/X
MedR Medication adherence recall barriers Difficulty remembering to take meds Yes/No/X
MI MI MI Yes/No/X
Napl Sodium Sodium Numeric Value: 0 to 300
NDIP CMCC NDI Pain CMCC Neck Disability Index - Pain Numeric Value: 0 to 300
NDIS CMCC NDI Score CMCC Neck Disability Index - Score Numeric Value: 0 to 300
NOSK Number of Cigarettes per day Smoking Numeric Value: 0 to 300
NOVS Need for nocturnal ventilated support Need for nocturnal ventilated support Yes/No/NA
NtrC Diet/Nutrition Counselling Given Diet/Nutrition Counselling Given Yes/No/X
NYHA NYHA Functional Capacity Classification NYHA Functional Capacity Classification Integer: 1 to 4
G Gravida Gravida {# of pregnancies} Numeric Value: 0 to 50
P Para Para {pregnancies carried to viable gest. age} Numeric Value: 0 to 50
OSWP Oswestry BDI Pain Oswestry Back Disability Index - Pain Numeric Value: 0 to 300
OSWS Oswestry BDI Score Oswestry Back Disability Index - Score Numeric Value: 0 to 300
OTCO Other Concerns Other Concerns Yes/No/X
OthC Other Counselling Given Other Counselling Given Yes/No/X
OUTR Outside Spirometry Referral Outside Spirometry Referral Yes/No/NA
PANE Painful Neuropathy Painful Neuropathy Yes/No/X
PAPF Pap Recall Pap Recall Documentation No Validations
PEDE Pitting Edema Pitting Edema Yes/No/X
PEFR PEFR value PEFR value Numeric Value greater than or equal to 0
PHIN Pharmacological Intolerance Pharmacological Intolerance Yes/No/NA
PIDU Previous Intravenous Drug Use Previous Intravenous Drug Use Yes/No/X
PPD PPD PPD Yes/No/NA
PRRF Pulmonary Rehabilitation Referral Pulmonary Rehabilitation Referral Yes/No/NA
PSPA Patient Sets physical Activity Goal Patient Sets physical Activity Goal Yes/No/NA
PSSC Psychosocial Screening Psychosocial Screening Yes/No/X
PsyC Psychosocial Counseling Given Psychosocial Counseling Given Yes/No/X
PULS P Heart Rate Numeric Value: 0 to 300
PVD PVD Peripheral vascular disease Yes/No/X
QDSH QuickDASH Score Disabilities of the Arm, Shoulder and Hand - Score Numeric Value: 0 to 300
RABG Recommend ABG Recommend ABG Yes/No/NA
REBG Review Blood Glucose Records Review Glucose Records Yes/No/X
RESP RR Respiratory Rate Numeric Value: 0 to 100
RETI Retinopathy null Yes/No/X
RPHR Review PHR Review PHR Yes/No/NA
RPPT Review Pathophysiology, Prognosis, Treatment with Patient Review Pathophysiology, Prognosis, Treatment with Patient Yes/No/NA
RVTN Revascularization Revascularization Yes/No/X
SCR Serum Creatinine Creatinine Numeric Value greater than or equal to 0
SEXF Sexual Function Sexual Function Yes/No/NA
SKST Smoking Status Smoking Status Yes/No/X
SMBG Self monitoring BG Self Monitoring Blood Glucose Yes/No/X
SmCC Smoking Cessation Counseling Given Smoking Cessation Counseling Given Yes/No/X
SMCD Self Management Challenges Self Management Challenges Yes/No/X
SMCP Smoking Cessation Program Smoking Cessation Program No Validations
SMCS Smoking Cessation Smoking Cessation Yes/No/NA
SMK Smoking Smoking Yes/No/X
SmkA Smoking Advice Advised to Quid Yes/No/X
SmkC Cigarette Smoking Cessation Cigarette Smoking Cessation Date
SmkD Daily Packs Packs of Cigarets Daily No Validations
SmkF Smoking Followup Followup Requested Yes/No/X
SmkP Cigarette Smoking History Cigarette Smoking History Numeric Value: 0 to 300
SmkS Cigarette Smoking Status Cigarette Smoking Status Numeric Value: 0 to 100
SODI Salt Intake Salt Intake Yes/No/X
SOHF Symptoms of Heart Failure Symptoms of Heart Failure Yes/No/X
SPIR Spirometry Spirometry Numeric Value greater than or equal to 0
SSEX Practicing Safe Sex Practicing Safe Sex Yes/No/X
STRE Stress Testing Stress Testing Yes/No/NA
StSc Stress Screen Several periods of irritability, feeling filled with anxiety, or difficulty sleeping b/c of stress Yes/No/X
SUAB Substance Use Substance Use Yes/No/X
SUO2 Need for supplemental oxygen Need for supplemental oxygen Yes/No/NA
TCHD TC/HDL LIPIDS TD/HDL Numeric Value: 0 to 50
TCHL Total Cholestorol Total Cholestorol Numeric Value: 0 to 10
TEMP Temp Temperature Numeric Value: 0 to 50
TG TG LIPIDS TG Numeric Value: 0 to 50
TOXP Toxoplasma IgG Toxoplasma IgG Yes/No/X
TRIG Triglycerides Triglycerides Numeric Value: 0 to 50
TSH TSH Thyroid Stimulating Hormone Numeric Value: 0 to 100
TUG Timed Up and Go Timed Up and Go Numeric Value greater than or equal to 0
UACR Alb creat ratio   ***DEPRECATED*** UACR Numeric Value: 0 to 300
UAIP Update AIDS defining illness in PMH Update AIDS defining illness in PMH Yes/No/X
UALB Urine alb: creat ratio  ***DEPRECATED***
Urine alb: creat ratio Numeric Value: 0 to 100
UDUS Update Drug Use Update Drug Use Yes/No/X
UHTP Update HIV Test History in PMH Update HIV Test History in PMH Yes/No/X
URBH Update Risk Behaviours Update Risk Behaviours Yes/No/X
USSH Update Sexual Identity in Social History Update Sexual Identity in Social History Yes/No/X
VB12 Vit B12 Vitamin B12 Numeric Value greater than or equal to 0
VDRL VDRL VDRL Yes/No/X
VLOA Viral Load Viral Load Numeric Value greater than or equal to 0
WAIS Waist Waist Numeric Value: 0 to 300
WHR Waist:Hip Waist Hip Ratio Numeric Value: 0 to 10
WT WT Weight Numeric Value: 0 to 300

 

 

To get the entire history of values for a measurement you will need to add the following javascript which will load a given measurement "measure" into two javascript variables measureArray and measureDateArray. 

<script type="text/javascript" language="javascript">

var measureArray=[];
var measureDateArray=[];

function getMeasures(measure) {
	xmlhttp=new XMLHttpRequest();
	var pathArray = window.location.pathname.split( '/' );
	var newURL = window.location.protocol + "//" + window.location.host +"/"+pathArray[1]+"/oscarEncounter/oscarMeasurements/SetupDisplayHistory.do?type="+measure;
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			var str=xmlhttp.responseText; //local variable
			if (!str) { return; }
			var myRe = /<td width="10">([\d,\.]+)<\/td>/g;  //for the measurement
			var myArray;
			var i=0;
			while ((myArray = myRe.exec(str)) !== null){
				measureArray[i]=myArray[1];
				i=i+1;
			}

			var myRe = /<td width="150">([0-9,-]+)<\/td>\s*<td width="150">/g;  //the first date is the observation date
			var myArray;
			var i=0;
			while ((myArray = myRe.exec(str)) !== null){
				measureDateArray[i]=myArray[1];
				i=i+1;
			}
		}
	}
	xmlhttp.open("GET",newURL,false);
	xmlhttp.send();
}
</script>

c. Enhanced database tags

Like with measurements these oscarDB's can both read and push to update the database. To allow a field to be updated in the database, the <databaseap> tag
(in resources/oscar/eform/apconfig.xml) for each field must include an <ap-insql> tag.

For Oscar 12_1 the following fields are so enabled:  patient_nameL, patient_nameF

The <ap-insql> tag allows: ${value} (value of the entered field),${demographic} (demographic number), ${provider} (provider number), and ${fid} (eform id).

In the eform, the <input> tag that you want to be able to update must include an oscarDBinput attribute, like this:

<input type="text" name="test" oscarDB=patient_nameL oscarDBinput>

Users must check the "Update fields in database" checkbox on the eform in order to update the fields on the form in the database.  Otherwise, they'll just be saved as part of the eform; the <ap-insql> query won't be executed.

Users can click on the "Refresh DB Fields" button to update all of the <input> tags with an oscarDB attribute with the most recently available data from the database.

All updates will be recorded in the security log as a DatabaseAP "edit" action, which includes the query that was executed.

d. Extended database tags

These oscarDBs cannot be directly called (i.e. oscarDB=<tag>). Similar to measurements they should be called in special formats so as to include extra parameters.

oscarOPEN="formname"

This will allow to open another eForm by name.  The following will open the eForm 'test':

<input type="button" name="a_name_is_required" oscarOPEN="test" />

 

oscarDB=e$first#{var_name}

Parameter: {var_name} = (name of eform field)
Description:
This ap retrieves the value of field {var_name} from the same eform which is first submitted.
Only value of the same eform (same fid) is retrieved, therefore eforms using this ap must have a field {var_name}.
Deleted eform data (fdid status=0) is excluded.

For example if you want to retrieve the value of the first patient which is stored in the field "name" for whom a copy of the same  eForm is saved you would use:

oscarDB=e$first#name


oscarDB=e$last#{var_name}

Parameter: {var_name} = (name of eform field)
Description:
This ap retrieves the value of field {var_name} from the same eform which is last submitted
Only value of the same eform (same fid) is retrieved, therefore eforms using this ap must have a field {var_name}.
Deleted eform data (fdid status=0) is excluded.

For example to retrieve the value of field "resident" in the same eform which is last submitted

oscarDB=e$last#resident


oscarDB=e$count#{var_name}

Parameter: {var_name} = (name of eform field)
Description:
This ap counts the total number of non-empty field {var_name} in all the same eforms.
Only value of the same eform (same fid) is retrieved, therefore eforms using this ap must have a field {var_name}.
Deleted eform data (fdid status=0) is excluded.

For example to retrieve the total number of fields "bp" which are filled in all the same eforms

 oscarDB=e$count#bp


var$value={var_value}

Parameter: {var_value} = (value of eform field)
This ap works together with e$count to count the total number of field {var_name} which has the value {var_value} in all the same forms.
It has no effect when put together with e$first or e$last.

If {var_value} contains space, it must be quoted ("...").
{var_value} can be a static value or be dynamic, see *Dynamic var_value* for detail.

For example to count the total number of field "resident" which has the value "Cheng, Ronnie" in all the same eforms

oscarDB=e$count#resident var$value="Cheng, Ronnie"


ref${var_name}

Parameter: {var_name} = (name of eform field)
This ap works together with e$count to count the total number of a certain field in the same forms which contains another non-empty field {var_name}.
It has no effect when put together with e$first or e$last.

For example to count  the total number of field "resident" in all the same eforms which also have the field "observer" filled

oscarDB=e$count#resident ref$observer


ref${var_name}={var_value}

Parameter: {var_name} = (name of eform field)
    {var_value} = (value of eform field)
This ap works together with e$count to count the total number of a certain field in the same forms which contains another  field {var_name} with the value {var_value}.
It has no effect when put together with e$first or e$last.

If {var_value} contains space, it must be quoted ("...").
{var_value} can be a static value or be dynamic, see *Dynamic var_value* for detail.

For example to count the total number of field "resident" in all the same eforms which also have field "observer"="Cheng, Ronnie"

oscarDB=e$count#resident ref$observer="Cheng, Ronnie"


eform$name={eform_name}


Parameter: {eform_name} = (name of another eform)
This ap works together with all e$ to retrieve values from another eform instead of the eform in use.
NOTE: If more than one eforms have the same name, only the first one (smallest fid) is referenced.

For example to count the total number of field "resident" in all the "Teaching Field Note" eforms which also have the field "observer" filled)

oscarDB=e$count#resident ref$observer eform$name="Teaching Field Note"


oscarDB=o${table_name}#{other_id_name}


Parameter: {table_name} = appointment/patient
    {other_id_name} = (name of the alternative id)
Description:
This ap retrieves alternative id from the other_id table.
Other_id table stores alternative id for patient demographics and appointments. Mapping to more tables can be created in the future.
For patient demographics alternative id, this ap references the demographic no of the current eform.
For appointments alternative id, it references the appointment no parameter passed when calling eform from the appointment screen.
NOTE: Appointments alternative id won't work if calling eform from "Search demographic".

For example to retrieve an appointment alternative id named "mc_number"

oscarDB=o$appointment#mc_number

*Dynamic var_value*

var_value can be set to reference a field value in the eform. To use this, simply write a field name and surround it with a pair of brackets {}.
NOTE: The var_value reference is made once when the eform is loaded. Therefore the field being referenced must have an initial value (value=... or oscarDB=...). User input to the referenced field will NOT change the var_value.

Example to count the total number of field "patient" in all the same eforms which has the value of field "patient" in this eform

<input name="patient" type="text" oscarDB=patient_name>
<input name="total_encounter" type="text" oscarDB=e$count#patient var$value={patient}>

 

Summary Template

Summary templates are defined in an eform to write a summary of the eform content into Oscar message, edoc or echart when the eform is submitted.

The template must be placed in comment <!-- ... -->

Special value tags are used to extract field values from eform.

Template format:

<!--
<template>
    <document belong=provider|patient>
        <docdesc>{document description}</docdesc>
        <docowner>{document owner}</docowner>
        <content>{content}</content>
    </document>

    <message>
        <subject>{subject}</subject>
        <sendto>{recipient1,recipient2,...}</sendto>
        <content>{content}</content>
    </message>

    <encounternote>{content}</encounternote>
    <socialhistory>{content}</socialhistory>
    <familyhistory>{content}</familyhistory>
    <medicalhistory>{content}</medicalhistory>
    <ongoingconcerns>{content}</ongoingconcerns>
    <riskfactors>{content}</riskfactors>
    <reminders>{content}</reminders>
    <othermeds>{content}</othermeds>
</template>
-->

Description:

Document template has a "belong=" attribute. If belong=provider, it is written as a provider document. If belong=patient, it is written as a patient document. The default is belong=provider.

The <docowner> entry must be a number. It is a provider_no/demographic_no. The default is the eform form_provider/demographic_no.

Message template <sendto> entry (ie recipient) must be one or more provider_no. There is no default to this entry.


For all the echart templates (<encounternote>, <socialhistory>, etc.), a link to the eform is added to the echart alongside the summary.

 

Value tags:

Value tags can be used anywhere in the summary templates, as long as it suits the format requirements.

Value tags come in 2 types: $t{...} and $te{...}


$t{...}

Put a field name inside the bracket. The field value will be filled-in when eform is submitted.

If the field name does not exist in eform, the tag will be written as it is to the summary.


$te{...}

These are "eform attribute" tags. They can be one of the following:

$te{eform.name|eform.subject|eform.patient|eform.provider|eform.link|eform.html}

In place of $te{eform.html}, the complete html of the eform will be written, with the action statement removed.

In place of $te{eform.link}, a link to the eform will be written and the eform name will be shown.

NOTE: Tag $te{eform.link} does not work in message content. Also, it's not necessary in echart templates because a link will already be in place.


Example:

Eform "TESTING" source html:

 

<html>
<input type="text" name="resident" value="Cheng, Ronnie">
</html>
<!--
<template>
 <encounternote>
This is the eform $te{eform.link}, it belongs to resident $t{resident}.
 </encounternote>
</template>
-->


Summary:


This is the eform TESTING, it belongs to resident Cheng, Ronnie.

(*The word TESTING is a link to the eform)

 

 

Document Actions