Personal tools
You are here: Home / OSCAR EMR version 15 / 2.0 The "Classic" Interface / 2.4.1 eForm Magic part A - Standard Tags

2.4.1 eForm Magic part A - Standard Tags

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

Pulling Data from Oscar using Database Tags

Standard Database Tags

 The following tags from Oscar15 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

Tags are read (display) only except those marked as (u) tags which the eform can also update the database based on user input.

* marked tags have been added to OSCAR_15 since June 2016

# marked tags have been added to OSCAR_15 since July 2018 (build 803)

oscarDB tag Description Example
time system time in this time zone
12:34:23
today system date
2016-01-29
appt_date appointment date
2015-12-11
current_form_id fid of current eform
number
current_form_data_id 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_specialty Specialty
GP
current_user_cpsid College Registration
54345
current_user_id Oscar User No
121
#current_user_address
 from the provider table
2913 Meridian
#current_user_work_phone
 from the provider table
705-672-1111
#current_user_email
 from the provider table
phc@oscarcanada.org
#current_user_fax
 from the provider table
705-672-2222
current_user_signature Oscar User Signature
MD (entered from Pref, Edit your Signature)
patient_name Upper Case Name
MACDONALD, JOHN A
first_last_name Mixed Case Name
John a Macdonald
patient_nameL (u) Last Name
MACDONALD
patient_nameF (u) First Name
JOHN A
patient_alias (u) Patient Alias as per demographic
Old Chieftain
#patient_title
Patients title if listed in demographic
MR
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
dd/mm/yyyy (d/m/y)
13/06/1938 (d/m/y)
dobc dd/mm/yyyy
13/06/1938
dobc2 yyyy/mm/dd
1938/06/13
*dobc3 mm/dd/yyyy 06/13/1938
#dob_MONTH-dd-yyyy
MONTH-dd-yyyy Jun-13-1938
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_type Insurance province/state
ON
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 Current age in years
74
age_in_months Current age in months
14
ageComplex Age expressed in days weeks or months for infants and toddlers and years  for older children or adults
3 day old
4 week old
6 month old
74 year old
#ageComplex2
Years and Months of age
74 years            7 Months
sex gender
M
#She_He
She or He based on gender
He
#him_her
him or her based on gender
him
#his_her
his_her based on gender
his
sin
Social Security Number
111-222-333
#partner_nameL
Partners last name from relationships
MACDONALD
#partner_nameF
Partners first name
AGNES
#partner_dob
dd/mm/yyyy (d/m/y)
13/06/1938 (d/m/y)
#partner_dob2
yyyy/mm/dd 1938/06/13
#partner_hin
Partners health number and version
7999962999 CR
#partner_phone
Partners phone
705-647-4399
medical_history history
1984 ANTEROLATERAL MYOCARDIAL INFARCT
2000 COPD
2001 ATYPICAL PNEUMONIA
2007 OSTEOPENIA
2009 CATARACT REMOVAL & IOL IMPLANT(Right)
2016 CVA (CEREBROVASCULAR)(Right)
#medical_history_ext  <br> delineated history
1984 ANTEROLATERAL MYOCARDIAL INFARCT<br>2000 COPD <br>2001 ATYPICAL PNEUMONIA<br>2007 OSTEOPENIA
other_medications_history Comma delineated list of family history and other meds
dad renal failure 76 IHD, mom AMI 75 NIDDM
#other_medications_history_ext  <br> delineated list of family history and other meds dad renal failure 76 IHD
mom AMI 75 NIDDM
social_family_history Comma delineated social history
Lives with son James, Retired Prime Minister
#social_family_history_ext <br> delineated list of social history
Lives with son James
Retired Prime Minister
ongoingconcerns Comma delineated list of ongoing concerns
Limited finances
#ongoingconcerns_ext
<br> delineated list of ongoing concerns Limited finances
#riskfactors
Comma delineated list of ongoing concerns  
#riskfactors_ext <br> delineated list of ongoing concerns  
reminders Comma delineated list of reminders
Findlay's, If unable to reach patient at home tel #, contact Mike (caretaker) at 705-676-7995(cell).
#reminders_ext
<br> delineated list of reminders  
risk_factors_json Risk Factors from CPP [{"note":"risky gambling"}]
     
family_history_json Family History from CPP [{"note":"Father cardiomyopathy 32 passed out\nuncle died of brain tumour 1.5yo"}]
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 Comma delineated allergies and
archived (deleted)
PENICILLIN
archived allergies: AMOXIL
allergies_des_no_archived Comma delineated current allergies
PENICILLIN
recent_rx recent Rx
2015-11-12 AGGRENOX Take 1 Tabs PO BID for 90 Days LU Code: 349 Qty:180 Repeats:3
2015-11-08 MUCOMYST INJ 200MG/ML 2 ml by nebuliser TID for 30 days Qty:90 ml Repeats:4
2015-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
2015-11-12 AGGRENOX Take 1 Tabs PO BID for 90 Days LU Code: 349 Qty:180 Repeats:3
#current_rx
current Rx
 Darco healing shoe With custom insole Qty:1 Repeats:0SITAGLIPTIN  25MG TABLET Take 1 po od Qty:0 Repeats:0METFORMIN 500MG Take 1 po bid Qty:0 Repeats:0TOBRAMYCIN FOR INJECTION 1.2G 150 mg iv q 12h for 19 days 1.5mg/kg = 150mg eGFR 45 Qty:5700 Repeats:0VENOFER 20MG 300mg for iv infusion please fill today Qty:1 Repeats:0CYANOCOBALAMIN INJECTION, USP 1000MCG Aminister 1ml IM or sc monthly Qty:10 Repeats:0CIPROFLOXACIN 500MG Take 1 po bid for 14 days LU 332 Qty:28 Repeats:0WARFARIN 4MG Take 1 po od or as directed for 30 days Qty:30 Repeats:2FUROSEMIDE 40MG Take 2 Tabs PO OD for 60 Days Qty:120 Repeats:3WARFARIN 2MG take as directed Qty:90 Repeats:0CLOXACILLIN 500MG Take 2 capsules (1 g) PO QID for two months Qty:480 Repeats:0PERCOCET 325MG/5MG Take 1-2 tabs PO QID PRN (Max 8 tabs per day) Qty:112 Repeats:0LYRICA 75MG take BID PO Qty:60 Repeats:0CLOXACILLIN  250MG CAPSULE Take 1 po qid for 14 days Qty:56 Repeats:0WARFARIN 1MG PO OD as directed Qty:90 Repeats:0FELODIPINE 2.5MG TABLET (EXTENDED-RELEAS
#current_rx_lt
current drugs marked as long term
 CYANOCOBALAMIN INJECTION, USP 1000MCG Aminister 1ml IM or sc monthly Qty:10 Repeats:0WARFARIN 4MG Take 1 po od or as directed for 30 days Qty:30 Repeats:2FUROSEMIDE 40MG Take 2 Tabs PO OD for 60 Days Qty:120 Repeats:3WARFARIN 2MG take as directed Qty:90 Repeats:0CLOXACILLIN 500MG Take 2 capsules (1 g) PO QID for two months Qty:480 Repeats:0SITAGLIPTIN  100MG TABLET Take 1 po od for 90 days Qty:90 Repeats:0COUMADIN 5MG Take 1 po od for 90 days Qty:90 Repeats:0BISOPROLOL 5MG Take 1 po od for 90 days Qty:90 Repeats:3ATORVASTATIN  20MG TABLET Take 1 po od for 90 days Qty:90 Repeats:3FELODIPINE 5MG Take 1 Tabs PO OD for 90 days Qty:90 Repeats:3METFORMIN 500MG Take 1 tab at breakfast, 1 tab at luch and 2 tabs at supper. Qty:360 Repeats:3RAMIPRIL 10MG Take 2 tabs OD Qty:180 Repeats:3Glucometer Strips and Lancets 1 QID prn Qty:100 Repeats:99SILDENAFIL 100MG Take 1/2 Tabs PO OD for PRN 30Days Qty:4  Repeats:0FUROSEMIDE 40MG Take 1 Tabs PO OD for 90Days Qty:90  Repeats:3 FELODIPINE 5 MG Take 1 Ta
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 mixed case comma delineated
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



#latest_echart_note
   [04-Jul-2018 .: inpatient 2/7 post pacemaker][8:18]
## Subjective:
Doing well, some knee pain
## Objective:
BP 123-146 systolic HR 60
minimal oedema
painful rt knee on rom
no effusion
ligaments intact clinically
rt heel necrotic patch basically unchanged apprx loonie sized
## Analysis:
1) Knee OA limited response post steroid injection
2) Heart block controlled with pacer
3) Vascular impairment rt foot
## Plan:
physio and rehab
d/w vascular sx
[Signed on 04-Jul-2018 8:26 by Dr. P Hutten-Czapski 57283]
#todays_notes
   
#todays_notes_ext
   
#document_list
 list of ids and documents
 4865,Ultrasound Doppler Venous Lower Rt;7774,1-Pap 2010 recall;7993,4-Flu 2010 recall;32342,1-Pap 2010 recall;44341,CCAC- Initial;44411,CCAC - Client Services Plan;48232,Dr. Lewis;49679,Dr. Lewis;50303,Appt for Sudbury vascular;52410,Referral to Dr. Rosoph;54042,ECHO;54259,CCAC- Initial;54610,CCAC- Initial;54852,CCAC- Client's Service Plan;57078,CCAC Plan;58927,Request for labs-TDP;62883,Physiotherapy Service- Client Summary;63709,CCAC- Client Discharge;64594,Dr.Fenton- Sudbury Vascular;64886,Dr.Fenton- Sudbury Vascular;105412,Dr. Willoughby- Sudbury Vascular;107376,Request for labs-TDP;107564,NEJAC Surgical Appointment;116315,Dr. Saidi-Orthopaedic Oncology + Arthroplasty Specialist;118988,Request for labs-TDP;120775,Sudbury Vascular- Lower Extremity Arterial Duplex Scan;120776,Sudbury Vascular;123049,Dr. Saidi- Orthopaedic Oncol;128788,Sudbury Vascular;129623,Request for LU Code;133551,Request for labs-TDP;133828,Request for labs-TDP;136108,Sudbury Vascular- Lower Extremity Arterial Duplex Scan;142993,Transt
onGTPAL Ontario Antenatal Record GTPAL code  GxTxPxAxLx
onEDB
Ontario Antenatal Record EDB
2016-12-31
bcGTPAL
British Columbia Antenatal Record GTPAL code
GxTxPxAxLx
bcEDD British Columbia Antenatal Record EDD
2016-12-31
doctor Last, First of doctor listed by Oscar in demographics
Hutten-Czapski, Peter
doctor_provider_no Provider number
1007
doctor_ohip_no Their billing number
150692
doctor_specialty_code Their specialty
00
doctor_cpsid Their CPSID
54345
doctor_title 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 from the provider table
705-672-1111
doctor_signature Their signature from provider preferences
MD
appt_provider_name The provider listed for the appointment
Hutten-Czapski, Peter
appt_provider_id The provider's id listed for the appointment
121
appt_no The appointment no
353104
#appt_date
yyyy-mm-dd
2018-07-05
#appt_time
hh:mm:ss
13:45:00
#appt_end_time
hh:mm:ss 14:14:00
#appt_provider_ohip_no
providers OHIP
150692
#appt_provider_cpsid
providers College id
54345
#next_appt_provider_id
OSCAR provider id
121
#next_appt_provider_name
Provider name
Hutten-Czapski, Peter
#next_appt_date
Date and time
2018-07-05, 13:45:00
#next_appt_time
hh:mm
13:45
#nextf_appt_date
yyyy-MONTH-dd
2018-Jul-05
referral_name Last, First
Spade, Sam
(These come from the ProfessionalSpecialists table using the ReferralNo)
#referral_Last_name
Last Spade
#referral_first_name
First
Sam
referral_address Multiline address
431 Whitewood Ave
New Liskeard ON P0J 1P0
#dr_referral_name
Dr.First Last
Dr.Sam Spade
#referral_no
OHIP Provider Number of the referral
150692
referral_phone Referral phone
(705) 647-1112 Ext 5422
referral_fax Fax no
705-647-1234
bc_referral_name
Last, First
SPADE, SAM
(These come from the billingreferral table using the ReferralNo)
bc_referral_address Multiline address
431 Whitewood Ave
New Liskeard ON P0J 1P0
bc_referral_phone Referral phone
(604) 647-1112 Ext 5422
bc_referral_fax
Fax no
604-647-1234
bc_referral_no Referring MD no
666666
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 date
1997-04-11
flu_immunization_date flu shot date
2017-11-06
#bcg_immunization_date BCG date
1997-04-11
#rmenb_immunization_date BEXSERO or rMenB 1997-04-11
#cholera_immunization_date CHOLERA date 1997-04-11
#chol_ecol_o_immunization_date Chol-Ecol-Oral date 1997-04-11
#dpt_polio_immunization_date DPT POLIO date DEPRECIATED prevention type use DTaP-IPV instead
#dptp_hib_immunization_date DPTP-Hib date DEPRECIATED prevention type use TdP-IPV-Hib instead
#dt_ipv_immunization_date DT-IPV date 1997-04-11
#dtap_hbv_ipv_hib_immunization_date DTaP-HBV-IPV-Hib
1997-04-11
#dtap_hib_immunization_date DTaP-Hib date 1997-04-11
#dtap_ipv_immunization_date DTaP-IPV date 1997-04-11
#dtap_ipv_hb_immunization_date DTaP-IPV-HB date 1997-04-11
#dtap_ipv_hib_immunization_date DTaP-IPV-Hib date 1997-04-11
#h1n1_immunization_date H1N1 date 1997-04-11
#hbtmf_immunization_date HBTmf date 1997-04-11
#hpv_vaccine_immunization_date HPV date
1997-04-11
#hpv_vaccine_9_immunization_date HPV Vaccine 9 date
DEPRECIATED prevention type use HPV instead
#hepa_immunization_date HepA date 1997-04-11
#hepab_immunization_date HepAB date 1997-04-11
#hepb_immunization_date HepB date 1997-04-11
#hib_immunization_date Hib date 1997-04-11
#ipv_immunization_date IPV date 1997-04-11
#je_immunization_date JE date 1997-04-11
#men_con_acwy_immunization_date MEN-CONJ-ACWY or Men-C-ACYW-135 1997-04-11
#mmr_immunization_date MMR date 1997-04-11
#mmrv_immunization_date MMRV date 1997-04-11
#mr_immunization_date MR date 1997-04-11
#mantoux_immunization_date Mantoux date 1997-04-11
#measles_immunization_date Measles date 1997-04-11
#men_p_ac_immunization_date Men-P-AC date 1997-04-11
#men_p_acwy_immunization_date Men-P-ACWY date 1997-04-11
#menb_b_immunization_date MenB-B date DEPRECIATED prevention type use rMenB instead
#menc_c_immunization_date MenC-C date 1997-04-11
#mumps_immunization_date Mumps date This apconfig.xml entry is currently broken
#opv_immunization_date OPV date No matching prevention currently
#otherA_immunization_date OtherA date 1997-04-11
#pediacel_immunization_date
pediacel date
DEPRECIATED prevention type use DTaP-IPV-Hib instead
#pneu_c_immunization_date Pneu-C or prevnar
1997-04-11
#pneumovax_immunization_date Pneumovax date 1997-04-11
#prolia_immunization_date prolia date DEPRECIATED prevention type
#RABIES_immunization_date RABIES date DEPRECIATED prevention type use Rabies instead
#rabies_immunization_date Rabies date 1997-04-11
#rot_immunization_date Rot date 1997-04-11
#rubella_immunization_date Rubella date DEPRECIATED prevention type
#shingles_immunization_date SHINGLES or HZV or RZV
1997-04-11
#t_immunization_date T date 1997-04-11
#tbe_immunization_date TBE date 1997-04-11
#td_immunization_date Td date 1997-04-11
#td_ipv_immunization_date Td-IPV (adult) date 1997-04-11
#tdp_immunization_date TdP date 1997-04-11
#tdp_ipv_hib_immunization_date TdP-IPV-Hib date 1997-04-11
#tdap_ipv_immunization_date Tdap-IPV date 1997-04-11
#tuberculosis_immunization_date Tuberculosis date DEPRECIATED prevention type use BCG instead
#typh-o_immunization_date Typh-O(ral) date 1997-04-11
#typhoid_immunization_date Thyphoid date 1997-04-11
#vz_immunization_date
Varicella V date 1997-04-11
#varicella_immunization_date Varicella date DEPRECIATED prevention type use VZ instead
#yf_immunization_date Yellow Fever date 1997-04-11
#bmd_immunization_date BMD date 1997-04-11
#bmd_immunization_last_value
BMD Value
abnormal
#colonoscopy_immunization_date COLONOSCOPY date 1997-04-11
#colonoscopy_immunization_last_value
COLONOSCOPY Value normal
fobt_immunization_date FOBT date 1997-04-11
#fobt_immunization_last_value FOBT Value
pending
#bmd_immunization_date  date 1997-04-11
#pft_immunization_date
PFT date
DEPRECIATED prevention type
#mam_immunization_date
MAM date 1997-04-11
#mam_immunization_data
all MAM result
pending normal normal
#mam_immunization_last_value
MAM Value
normal
#pap_immunization_date PAP Date
1997-04-11
#pap_immunization_last_value PAP Value
normal
#psa_immunization_date PSA Date
1997-04-11
#psa_immunization_last_value PSA Value
normal
#abdo_immunization_date
Abdo U/S for AAA
DEPRECIATED prevention type
#bone_scan_immunization_date
BONE SCAN date
DEPRECIATED prevention type
#cpx_immunization_date
CPX date
DEPRECIATED prevention type
#ct_scan_immunization_date
CT Scan date
DEPRECIATED prevention type
#cxr_immunization_date
CXR
DEPRECIATED prevention type
#chlamydia_immunization_date
chlamydia test date
1997-04-11
#ecg_immunization_date
ECG
DEPRECIATED prevention type
#eeg_immunization_date
EEG
DEPRECIATED prevention type
#ekg_immunization_date
EKG
DEPRECIATED prevention type
#emg_immunization_date EMG
DEPRECIATED prevention type
#ekg_immunization_date EKG
DEPRECIATED prevention type
#endoscopy_immunization_date ENDOSCOPY DEPRECIATED prevention type
#echo_immunization_date Echo
DEPRECIATED prevention type
fobt_immunization_date fobt date
1997-04-11
#gonorrhea_pcr_immunization_date
Gonorrhea PCR
1997-04-11
#hiv_immunization_date
HIV test date
1997-04-11
#hepa_immunization_date HepA screen
DEPRECIATED prevention type
#hepb_immunization_date HepB screen
1997-04-11
#hepc_immunization_date HepC screen
1997-04-11
#mammogram_immunization_date mammo date
DEPRECATED see mam tags
pap_immunization_date pap date
1997-04-11
#mmse_immunization_date
MMSE
DEPRECIATED prevention type
#mri_immunization_date MRI
DEPRECIATED prevention type
#moca_immunization_date MoCA
DEPRECIATED prevention type
#moca_immunization_date OtherB date
1997-04-11
#pet_scan_immunization_date PET SCAN
DEPRECIATED prevention type
#sleep_study_immunization_date Sleep Study
DEPRECIATED prevention type
#stress_test_immunization_date Stress Test
DEPRECIATED prevention type
#ultrasound_immunization_date Ultrasound
DEPRECIATED prevention type
#vdrl_immunization_date VDRL date
1997-04-11
#virtual_colonscopy_immunization_date VIRTUAL COLONOSCOPY
DEPRECIATED prevention type
#xrays_immunization_date XRays
DEPRECIATED prevention type
     
cytology_no
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 patient email
my.name@oscarcanada.org
urine_tox_test_json Measurements OPID MAMP BZD CANB Uetc
[{"type":"BZD","dataField":"pos","comments":"","dateObserved":"2016-04-04 00:00:00.0","dateEntered":"2016-04-04 12:34:46.0"},{"type":"MAMP","dataField":"neg","comments":"","dateObserved":"2016-04-04 00:00:00.0","dateEntered":"2016-04-04 12:34:46.0"}]
methadone_induction_assessment_json Measurements RHU ORDU MDD GWS
[{"type":"RHU","dataField":"Yes","comments":"","dateObserved":"2016-04-04 00:00:00.0","dateEntered":"2016-04-04 12:34:46.0"}]

Using JSON tags

The JSON tags give results in JavaScript Object Notation that allows for arrays of data to be passed.  These strings are typically parsed by a programming language into an array of data.  The following example uses javascript to manipulate the data and present it on the form

<script>
function runJSON(){
   var text ='{note:'+document.getElementById("urine_tox_test_json").value+'}';
   obj = JSON.parse(text);
   document.getElementById("demo").innerHTML = obj.data[1].type+"="+obj.data[1].dataField  ;
}
</script>
</head>
<body onload="runJSON()">
<form method="post" action="" name="FormName" id="FormName" >
<p id="demo"></p>
<input id=""urine_tox_test_json" type="hidden"  oscarDB=urine_tox_test_json>

with the data from the tag example table above would display the paragraph element with id of demo with

MAMP=neg

The following eform tags are not directly accessible and are used in some invoice functions

service_date billing date

practitioner billing provider
ref_doctor billing referring id
fee_total Invoice total 0.00
payment_total Payment total
0.00
refund_total Refund total
0.00
balance_owing
balance
0.00
bill_item_number billing item

bill_item_description billing description

bill_item_service_code billing service code

bill_item_qty billing quantity

bill_item_dx billing diagnosis

bill_item_amount billing item amount

Enhanced Updatable Database Tags

These oscarDB's (as with measurements) 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 with an UPDATE sql statement.

For Oscar 15 the following fields are so enabled:  patient_nameL, patient_nameF, patient_alias

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 are recorded in the security log as a DatabaseAP "edit" action, which includes the query that was executed.

Extended database tags

These oscarDBs cannot be directly called (i.e. oscarDB=<tag>). 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