{% capture childItems %}{% if QuestionnaireResponse.item.where(linkId = 'questionnaire').exists() %}Cardio Study Referral Form
{% for currentItem in QuestionnaireResponse.item.where(linkId = 'questionnaire') %}{% capture childItems %}{% if currentItem.item.where(linkId = 'diagramSec').exists() %}{% for currentItem in currentItem.item.where(linkId = 'diagramSec') %}{% capture childItems %}{% endcapture %}{% assign itemList = childItems || remove_last: '$SEP$' || split: '$SEP$' %}{% for listItem in itemList %}{{ listItem }}{% if forloop.last.not() %}{% if forloop.nextitem %}
{% else %}
{% endif %}{% endif %}{% endfor %}{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'commonServices').exists() %}
Cardiology Services/Common Indications/Clinical Information
{% for currentItem in currentItem.item.where(linkId = 'commonServices') %}{% capture childItems %}{% if currentItem.item.where(linkId = 'echoColourDopplerSec').exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDopplerSec') %}{% capture childItems %}{% if currentItem.item.where(linkId = 'echoColourDopplerSpec').exists() %}2D Echo And Colour Dopper: {% for currentItem in currentItem.item.where(linkId = 'echoColourDopplerSpec') %}{% capture childItems %}{% if currentItem.item.where(linkId = 'echoColourDoppler1' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler1' and answer.exists(value.ofType(boolean)=true)) %}Heart Murmur{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'echoColourDoppler2' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler2' and answer.exists(value.ofType(boolean)=true)) %}Native Valvular Stenosis{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'echoColourDoppler3' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler3' and answer.exists(value.ofType(boolean)=true)) %}Native Valvular Regurgitation{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'echoColourDoppler4' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler4' and answer.exists(value.ofType(boolean)=true)) %}Known or Suspected MVP with MR{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'echoColourDoppler5' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler5' and answer.exists(value.ofType(boolean)=true)) %}Prosthetic Heart Valve(s){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'echoColourDoppler7' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler7' and answer.exists(value.ofType(boolean)=true)) %}Hypertension (Hypertensive Heart Disease){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'echoColourDoppler8' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler8' and answer.exists(value.ofType(boolean)=true)) %}Dyspnea-CHF (LV Function & RVSP){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'echoColourDoppler9' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler9' and answer.exists(value.ofType(boolean)=true)) %}Dyspnea-CHF (with preserved EF){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'echoColourDoppler10' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler10' and answer.exists(value.ofType(boolean)=true)) %}Dyspnea-CHF (with reduced EF){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'echoColourDoppler11' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler11' and answer.exists(value.ofType(boolean)=true)) %}Pulmonary Disease (RV Function & RVSP){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'echoColourDoppler13' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler13' and answer.exists(value.ofType(boolean)=true)) %}Chest Pain (CAD){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'echoColourDoppler14' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler14' and answer.exists(value.ofType(boolean)=true)) %}CAD (Post MI/Intervention){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'echoColourDoppler16' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler16' and answer.exists(value.ofType(boolean)=true)) %}Aortopathy (Thoracic Aortic Disease){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'echoColourDoppler17' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler17' and answer.exists(value.ofType(boolean)=true)) %}Pericardial Disease/Effusion{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'echoColourDoppler18' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler18' and answer.exists(value.ofType(boolean)=true)) %}Cardiac Source of Systemic Emboli{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'echoColourDoppler19' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler19' and answer.exists(value.ofType(boolean)=true)) %}Arrhythmias (Atrial Fib-Flutter){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'echoColourDoppler20' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'echoColourDoppler20' and answer.exists(value.ofType(boolean)=true)) %}Arrhythmias (Syncope/Palpitations){% endfor %}$SEP${% endif %}{% endcapture %}{% assign itemList = childItems || remove_last: '$SEP$' || split: '$SEP$' %}{% for listItem in itemList %}{{ listItem }}{% if forloop.last.not() %}{% if forloop.nextitem %}, {% else %} and {% endif %}{% endif %}{% endfor %}{% endfor %}$SEP${% endif %}{% endcapture %}{% assign itemList = childItems || remove_last: '$SEP$' || split: '$SEP$' %}{% for listItem in itemList %}{{ listItem }}{% if forloop.last.not() %}{% if forloop.nextitem %}
{% else %}
{% endif %}{% endif %}{% endfor %}{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'treadmillStressEchoSec').exists() %}{% for currentItem in currentItem.item.where(linkId = 'treadmillStressEchoSec') %}{% capture childItems %}{% if currentItem.item.where(linkId = 'treadmillStressEchoSpec').exists() %}Treadmill Stress Echo: {% for currentItem in currentItem.item.where(linkId = 'treadmillStressEchoSpec') %}{% capture childItems %}{% if currentItem.item.where(linkId = 'treadmillStressEcho1' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'treadmillStressEcho1' and answer.exists(value.ofType(boolean)=true)) %}Screening for CAD (Moderate-High risk for CAD){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'treadmillStressEcho2' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'treadmillStressEcho2' and answer.exists(value.ofType(boolean)=true)) %}Screening for CAD (Chest Pain on the Background of Multiple Coronary risks){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'treadmillStressEcho3' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'treadmillStressEcho3' and answer.exists(value.ofType(boolean)=true)) %}CAD (Follow-up Post Intervention){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'treadmillStressEcho4' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'treadmillStressEcho4' and answer.exists(value.ofType(boolean)=true)) %}CAD (Follow-up on Medical Therapy){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'treadmillStressEcho5' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'treadmillStressEcho5' and answer.exists(value.ofType(boolean)=true)) %}Exertional Dyspnea{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'treadmillStressEcho6' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'treadmillStressEcho6' and answer.exists(value.ofType(boolean)=true)) %}Valvular Stenosis (Exercise Capacity and LV Contractile Reserve){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'treadmillStressEcho7' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'treadmillStressEcho7' and answer.exists(value.ofType(boolean)=true)) %}Valvular Regurgitation (Exercise Capacity and LV Contractile Reserve){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'treadmillStressEcho8' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'treadmillStressEcho8' and answer.exists(value.ofType(boolean)=true)) %}Provocable LVOT Obstruction{% endfor %}$SEP${% endif %}{% endcapture %}{% assign itemList = childItems || remove_last: '$SEP$' || split: '$SEP$' %}{% for listItem in itemList %}{{ listItem }}{% if forloop.last.not() %}{% if forloop.nextitem %}, {% else %} and {% endif %}{% endif %}{% endfor %}{% endfor %}$SEP${% endif %}{% endcapture %}{% assign itemList = childItems || remove_last: '$SEP$' || split: '$SEP$' %}{% for listItem in itemList %}{{ listItem }}{% if forloop.last.not() %}{% if forloop.nextitem %}
{% else %}
{% endif %}{% endif %}{% endfor %}{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'leadECGSec').exists() %}{% for currentItem in currentItem.item.where(linkId = 'leadECGSec') %}{% capture childItems %}{% if currentItem.item.where(linkId = 'leadECG' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'leadECG' and answer.exists(value.ofType(boolean)=true)) %}12 Lead ECG{% endfor %}$SEP${% endif %}{% endcapture %}{% assign itemList = childItems || remove_last: '$SEP$' || split: '$SEP$' %}{% for listItem in itemList %}{{ listItem }}{% if forloop.last.not() %}{% if forloop.nextitem %}
{% else %}
{% endif %}{% endif %}{% endfor %}{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'ambulatoryBPMonitoringSec').exists() %}{% for currentItem in currentItem.item.where(linkId = 'ambulatoryBPMonitoringSec') %}{% capture childItems %}{% if currentItem.item.where(linkId = 'ambulatoryBPMonitoring' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'ambulatoryBPMonitoring' and answer.exists(value.ofType(boolean)=true)) %}24 Hour Ambulatory Blood Pressure Monitoring{% endfor %}$SEP${% endif %}{% endcapture %}{% assign itemList = childItems || remove_last: '$SEP$' || split: '$SEP$' %}{% for listItem in itemList %}{{ listItem }}{% if forloop.last.not() %}{% if forloop.nextitem %}
{% else %}
{% endif %}{% endif %}{% endfor %}{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'holterMonitoringSec').exists() %}{% for currentItem in currentItem.item.where(linkId = 'holterMonitoringSec') %}{% capture childItems %}{% if currentItem.item.where(linkId = 'holterMonitoringTime' and answer.exists()).exists() %}{% for currentItem in currentItem.item.where(linkId = 'holterMonitoringTime' and answer.exists()) %}{% if currentItem.answer.exists() %}{% capture answer %}{% for answer in currentItem.answer %}{% if answer.value.code = '3 day' %}3 day{% endif %}{% if answer.value.code = '14 day' %}14 day{% endif %}{% endfor %}{% endcapture %}{{answer}} Holter Monitoring{% endif %}{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'holterMonitoringSpec').exists() %}: {% for currentItem in currentItem.item.where(linkId = 'holterMonitoringSpec') %}{% capture childItems %}{% if currentItem.item.where(linkId = 'holterMonitoring1' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'holterMonitoring1' and answer.exists(value.ofType(boolean)=true)) %}Abnormal ECG (AV Block, Bundle Brunch Block){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'holterMonitoring2' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'holterMonitoring2' and answer.exists(value.ofType(boolean)=true)) %}Palpitations{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'holterMonitoring3' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'holterMonitoring3' and answer.exists(value.ofType(boolean)=true)) %}Syncope/Presyncope{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'holterMonitoring4' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'holterMonitoring4' and answer.exists(value.ofType(boolean)=true)) %}Post CVA/TIA{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'holterMonitoring5' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'holterMonitoring5' and answer.exists(value.ofType(boolean)=true)) %}Dyspnea/Chest Pain{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'holterMonitoring6' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'holterMonitoring6' and answer.exists(value.ofType(boolean)=true)) %}Weakness/Fatigue{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'holterMonitoring7' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'holterMonitoring7' and answer.exists(value.ofType(boolean)=true)) %}Rule Out A-fib/Flutter{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'holterMonitoring8' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'holterMonitoring8' and answer.exists(value.ofType(boolean)=true)) %}A-fib Rate control{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'holterMonitoring9' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'holterMonitoring9' and answer.exists(value.ofType(boolean)=true)) %}Atrial Arrhythmia{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'holterMonitoring10' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'holterMonitoring10' and answer.exists(value.ofType(boolean)=true)) %}Ventricular Arrhythmia{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'holterMonitoring11' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'holterMonitoring11' and answer.exists(value.ofType(boolean)=true)) %}Medication Effect{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'holterMonitoring12Type' and answer.exists()).exists() %}{% for currentItem in currentItem.item.where(linkId = 'holterMonitoring12Type' and answer.exists()) %}{% if currentItem.answer.exists() %}{% capture answer %}{% for answer in currentItem.answer %}{% if answer.value.code = 'VVI' %}VVI{% endif %}{% if answer.value.code = 'DDD' %}DDD{% endif %}{% endfor %}{% endcapture %}Pacemaker ({{answer}}){% endif %}{% endfor %}$SEP${% endif %}{% endcapture %}{% assign itemList = childItems || remove_last: '$SEP$' || split: '$SEP$' %}{% for listItem in itemList %}{{ listItem }}{% if forloop.last.not() %}{% if forloop.nextitem %}, {% else %} and {% endif %}{% endif %}{% endfor %}{% endfor %}$SEP${% endif %}{% endcapture %}{% assign itemList = childItems || remove_last: '$SEP$' || split: '$SEP$' %}{% for listItem in itemList %}{{ listItem }}{% if forloop.last.not() %}{% if forloop.nextitem %}
{% else %}
{% endif %}{% endif %}{% endfor %}{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'cardiologyConsultSec').exists() %}{% for currentItem in currentItem.item.where(linkId = 'cardiologyConsultSec') %}{% capture childItems %}{% if currentItem.item.where(linkId = 'cardiologyConsult' and answer.exists(value.ofType(boolean)=true)).exists() %}{% for currentItem in currentItem.item.where(linkId = 'cardiologyConsult' and answer.exists(value.ofType(boolean)=true)) %}CARDIOLOGY CONSULT (first available){% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'cardiologyConsultSpec').exists() %}{% for currentItem in currentItem.item.where(linkId = 'cardiologyConsultSpec') %}{% capture childItems %}{% endcapture %}{% assign itemList = childItems || remove_last: '$SEP$' || split: '$SEP$' %}{% for listItem in itemList %}{{ listItem }}{% if forloop.last.not() %}{% if forloop.nextitem %}, {% else %} or {% endif %}{% endif %}{% endfor %}{% endfor %}$SEP${% endif %}{% endcapture %}{% assign itemList = childItems || remove_last: '$SEP$' || split: '$SEP$' %}{% for listItem in itemList %}{{ listItem }}{% if forloop.last.not() %}{% if forloop.nextitem %}
{% else %}
{% endif %}{% endif %}{% endfor %}{% endfor %}$SEP${% endif %}{% endcapture %}{% assign itemList = childItems || remove_last: '$SEP$' || split: '$SEP$' %}{% for listItem in itemList %}{{ listItem }}{% if forloop.last.not() %}{% if forloop.nextitem %}
{% else %}
{% endif %}{% endif %}{% endfor %}{% endfor %}$SEP${% endif %}{% if currentItem.item.where(linkId = 'clinicalInfoSec').exists() %}
Clinical Info
{% for currentItem in currentItem.item.where(linkId = 'clinicalInfoSec') %}{% capture childItems %}{% if currentItem.item.where(linkId = 'clinicalInfo' and answer.exists()).exists() %}{% for currentItem in currentItem.item.where(linkId = 'clinicalInfo' and answer.exists()) %}{% if currentItem.answer.exists() %} {% for answer in currentItem.answer %}{{ answer.value }}{% endfor %}{% endif %}{% endfor %}$SEP${% endif %}{% endcapture %}{% assign itemList = childItems || remove_last: '$SEP$' || split: '$SEP$' %}{% for listItem in itemList %}{{ listItem }}{% if forloop.last.not() %}{% if forloop.nextitem %}
{% else %}
{% endif %}{% endif %}{% endfor %}{% endfor %}$SEP${% endif %}{% endcapture %}{% assign itemList = childItems || remove_last: '$SEP$' || split: '$SEP$' %}{% for listItem in itemList %}{{ listItem }}{% if forloop.last.not() %}{% if forloop.nextitem %}
{% else %}
{% endif %}{% endif %}{% endfor %}{% endfor %}$SEP${% endif %}{% endcapture %}{% assign itemList = childItems || remove_last: '$SEP$' || split: '$SEP$' %}{% for listItem in itemList %}{{ listItem }}{% if forloop.last.not() %}{% if forloop.nextitem %}
{% else %}
{% endif %}{% endif %}{% endfor %}