observation_source_concept_id
SUS Outpatient Procedure Observation
Source column PrimaryProcedure. Resolve OPCS4 codes to OMOP concepts. If code cannot be mapped, map using the parent code.
PrimaryProcedureOPCS-4 Procedure code. PROCEDURE (OPCS)
with results as
(
select
distinct
op.GeneratedRecordIdentifier,
op.NHSNumber,
op.AppointmentDate,
op.AppointmentTime,
p.ProcedureOPCS as PrimaryProcedure
from omop_staging.sus_OP op
inner join omop_staging.sus_OP_OPCSProcedure p
on op.MessageId = p.MessageId
where NHSNumber is not null
and AttendedorDidNotAttend in ('5','6')
)
select *
from results
order by
GeneratedRecordIdentifier,
NHSNumber,
AppointmentDate,
AppointmentTime,
PrimaryProcedure
Comment or raise an issue for this mapping.
Sus OP ICDDiagnosis table
Source column DiagnosisICD. Resolve ICD10 codes to standard or non standard OMOP concepts. If code cannot be mapped, map using the parent code.
DiagnosisICDICD10 diagnosis code PRIMARY DIAGNOSIS (ICD)
select
distinct
d.DiagnosisICD,
op.GeneratedRecordIdentifier,
op.NHSNumber,
op.CDSActivityDate
from omop_staging.sus_OP_ICDDiagnosis d
inner join omop_staging.sus_OP op
on d.MessageId = op.MessageId
where op.NHSNumber is not null
and AttendedorDidNotAttend in ('5','6')
Comment or raise an issue for this mapping.
Sus CCMDS High Cost Drugs
Source column ObservationSourceValue. Resolve OPCS4 codes to OMOP concepts. If code cannot be mapped, map using the parent code.
ObservationSourceValueHigh cost drugs. HIGH COST DRUGS (OPCS)
select distinct
apc.NHSNumber,
apc.HospitalProviderSpellNumber,
cc.CriticalCareStartDate as ObservationDate,
coalesce(cc.CriticalCareStartTime, '00:00:00') as ObservationDateTime,
d.CriticalCareHighCostDrugs as ObservationSourceValue
from omop_staging.sus_CCMDS_CriticalCareHighCostDrugs d
inner join omop_staging.sus_CCMDS cc on d.MessageId = cc.MessageId
inner join omop_staging.sus_APC apc on cc.GeneratedRecordID = apc.GeneratedRecordIdentifier
where apc.NHSNumber is not null
Comment or raise an issue for this mapping.
SUS APC Procedure Occurrence
Source column PrimaryProcedure. Resolve OPCS4 codes to OMOP concepts. If code cannot be mapped, map using the parent code.
PrimaryProcedureOPCS-4 Procedure code. PROCEDURE (OPCS)
select
distinct
apc.GeneratedRecordIdentifier,
apc.NHSNumber,
p.ProcedureDateOPCS as PrimaryProcedureDate,
p.ProcedureOPCS as PrimaryProcedure
from omop_staging.sus_APC apc
inner join omop_staging.sus_OPCSProcedure p
on apc.MessageId = p.MessageId
where NHSNumber is not null
order by
apc.GeneratedRecordIdentifier,
apc.NHSNumber,
p.ProcedureDateOPCS,
p.ProcedureOPCS
Comment or raise an issue for this mapping.
Sus APC Diagnosis Table
Source column DiagnosisICD. Resolve ICD10 codes to standard or non standard OMOP concepts. If code cannot be mapped, map using the parent code.
DiagnosisICDICD10 diagnosis code PRIMARY DIAGNOSIS (ICD)
select
distinct
d.DiagnosisICD,
apc.GeneratedRecordIdentifier,
apc.NHSNumber,
apc.CDSActivityDate
from omop_staging.sus_ICDDiagnosis d
inner join omop_staging.sus_APC apc
on d.MessageId = apc.MessageId
where apc.NHSNumber is not null
order by
d.DiagnosisICD,
apc.GeneratedRecordIdentifier,
apc.NHSNumber,
apc.CDSActivityDate
Comment or raise an issue for this mapping.
SUS APC Anaesthetic Given Post Labour Delivery Observation
- Constant value set to
2000500002. ANAESTHETIC GIVEN POST LABOUR OR DELIVERY CODE
Comment or raise an issue for this mapping.
SUS APC Anaesthetic During Labour Delivery Observation
- Constant value set to
2000500001. ANAESTHETIC GIVEN DURING LABOUR OR DELIVERY CODE
Comment or raise an issue for this mapping.
COSD V9 LV Observation Smoking Status Cancer
- Constant value set to
43054909. Tobacco smoking status
Comment or raise an issue for this mapping.
COSD V9 LV Observation Performance Status Adult
- Constant value set to
4309681. General physical performance status
Comment or raise an issue for this mapping.
COSD V9 LV Observation Familial Cancer Syndrome Indicator
- Constant value set to
4171594. Family history of malignant neoplasm
Comment or raise an issue for this mapping.
COSD V9 LV Observation Cancer Treatment Intent
- Constant value set to
4194400. Treatment intent
Comment or raise an issue for this mapping.
COSD V8 LV Observation Performance Status Adult
- Constant value set to
4309681. General physical performance status
Comment or raise an issue for this mapping.
COSD V8 LV Observation Cancer Treatment Intent
- Constant value set to
4194400. Treatment intent
Comment or raise an issue for this mapping.
CosdV9LungFamilialCancerSyndrome
- Constant value set to
2000500005. Familial Cancer (Indicator)
Comment or raise an issue for this mapping.
CosdV8LungAlcoholHistoryCancerInLastThreeMonths
- Constant value set to
2000500003. History Of Alcohol (Current)
Comment or raise an issue for this mapping.
CosdV8LungAlcoholHistoryCancerBeforeLastThreeMonths
- Constant value set to
2000500004. History Of Alcohol (Past)
Comment or raise an issue for this mapping.
COSD V9 HN Observation Smoking Status Cancer
- Constant value set to
43054909. Tobacco smoking status
Comment or raise an issue for this mapping.
COSD V9 HN Observation Performance Status Adult
- Constant value set to
4309681. General physical performance status
Comment or raise an issue for this mapping.
COSD V9 HN Observation Familial Cancer Syndrome Indicator
- Constant value set to
4171594. Family history of malignant neoplasm
Comment or raise an issue for this mapping.
COSD V9 HN Observation Cancer Treatment Intent
- Constant value set to
4194400. Treatment intent
Comment or raise an issue for this mapping.
COSD V9 HN Observation Alcohol History Cancer In Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V9 HN Observation Alcohol History Cancer Before Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V8 HN Observation Smoking Status Cancer
- Constant value set to
43054909. Tobacco smoking status
Comment or raise an issue for this mapping.
COSD V8 HN Observation Performance Status Adult
- Constant value set to
4309681. General physical performance status
Comment or raise an issue for this mapping.
COSD V8 HN Observation Familial Cancer Syndrome Indicator
- Constant value set to
4171594. Family history of malignant neoplasm
Comment or raise an issue for this mapping.
COSD V8 HN Observation Cancer Treatment Intent
- Constant value set to
4194400. Treatment intent
Comment or raise an issue for this mapping.
COSD V8 HN Observation Alcohol History Cancer In Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V8 HN Observation Alcohol History Cancer Before Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V9 HA Observation Smoking Status Cancer
- Constant value set to
43054909. Tobacco smoking status
Comment or raise an issue for this mapping.
COSD V9 HA Observation Performance Status Adult
- Constant value set to
4309681. General physical performance status
Comment or raise an issue for this mapping.
COSD V9 HA Observation Familial Cancer Syndrome Indicator
- Constant value set to
4171594. Family history of malignant neoplasm
Comment or raise an issue for this mapping.
COSD V9 HA Observation Cancer Treatment Intent
- Constant value set to
4194400. Treatment intent
Comment or raise an issue for this mapping.
COSD V9 HA Observation Alcohol History Cancer In Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V9 HA Observation Alcohol History Cancer Before Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V8 HA Observation Smoking Status Cancer
- Constant value set to
43054909. Tobacco smoking status
Comment or raise an issue for this mapping.
COSD V8 HA Observation Performance Status Adult
- Constant value set to
4309681. General physical performance status
Comment or raise an issue for this mapping.
COSD V8 HA Observation Familial Cancer Syndrome Indicator
- Constant value set to
4171594. Family history of malignant neoplasm
Comment or raise an issue for this mapping.
COSD V8 HA Observation Cancer Treatment Intent
- Constant value set to
4194400. Treatment intent
Comment or raise an issue for this mapping.
COSD V8 HA Observation Alcohol History Cancer In Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V8 HA Observation Alcohol History Cancer Before Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V9 GY Observation Smoking Status Cancer
- Constant value set to
43054909. Tobacco smoking status
Comment or raise an issue for this mapping.
COSD V9 GY Observation Performance Status Adult
- Constant value set to
4309681. General physical performance status
Comment or raise an issue for this mapping.
COSD V9 GY Observation Familial Cancer Syndrome Indicator
- Constant value set to
4171594. Family history of malignant neoplasm
Comment or raise an issue for this mapping.
COSD V9 GY Observation Cancer Treatment Intent
- Constant value set to
4194400. Treatment intent
Comment or raise an issue for this mapping.
COSD V9 GY Observation Alcohol History Cancer In Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V9 GY Observation Alcohol History Cancer Before Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V8 GY Observation Smoking Status Cancer
- Constant value set to
43054909. Tobacco smoking status
Comment or raise an issue for this mapping.
COSD V8 GY Observation Performance Status Adult
- Constant value set to
4309681. General physical performance status
Comment or raise an issue for this mapping.
COSD V8 GY Observation Familial Cancer Syndrome Indicator
- Constant value set to
4171594. Family history of malignant neoplasm
Comment or raise an issue for this mapping.
COSD V8 GY Observation Cancer Treatment Intent
- Constant value set to
4194400. Treatment intent
Comment or raise an issue for this mapping.
COSD V8 GY Observation Alcohol History Cancer In Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V8 GY Observation Alcohol History Cancer Before Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V9 CT Observation Tobacco Smoking Cessation Treatment Indication Code
- Constant value set to
4206526. Smoking cessation behavior
Comment or raise an issue for this mapping.
COSD V9 CT Observation Smoking Status Cancer
- Constant value set to
43054909. Tobacco smoking status
Comment or raise an issue for this mapping.
COSD V9 CT Observation Performance Status Adult
- Constant value set to
4309681. General physical performance status
Comment or raise an issue for this mapping.
COSD V9 CT Observation Familial Cancer Syndrome Indicator
- Constant value set to
4171594. Family history of malignant neoplasm
Comment or raise an issue for this mapping.
COSD V9 CT Observation Cancer Treatment Intent
- Constant value set to
4194400. Treatment intent
Comment or raise an issue for this mapping.
COSD V9 CT Observation Alcohol History Cancer In Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V9 CT Observation Alcohol History Cancer Before Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V8 CT Observation Smoking Status Cancer
- Constant value set to
43054909. Tobacco smoking status
Comment or raise an issue for this mapping.
COSD V8 CT Observation Performance Status Adult
- Constant value set to
4309681. General physical performance status
Comment or raise an issue for this mapping.
COSD V8 CT Observation Familial Cancer Syndrome Indicator
- Constant value set to
4171594. Family history of malignant neoplasm
Comment or raise an issue for this mapping.
COSD V8 CT Observation Alcohol History Cancer In Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V8 CT Observation Alcohol History Cancer Before Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V9 CR Observation Tobacco Smoking Cessation Treatment Indication Code
- Constant value set to
4206526. Smoking cessation behavior
Comment or raise an issue for this mapping.
COSD V9 CR Observation Smoking Status Cancer
- Constant value set to
43054909. Tobacco smoking status
Comment or raise an issue for this mapping.
COSD V9 CR Observation Performance Status Adult
- Constant value set to
4309681. General physical performance status
Comment or raise an issue for this mapping.
COSD V9 CR Observation Familial Cancer Syndrome Indicator
- Constant value set to
4171594. Family history of malignant neoplasm
Comment or raise an issue for this mapping.
COSD V9 CR Observation Cancer Treatment Intent
- Constant value set to
4194400. Treatment intent
Comment or raise an issue for this mapping.
COSD V9 CR Observation Alcohol History Cancer In Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V9 CR Observation Alcohol History Cancer Before Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V8 CR Observation Smoking Status Cancer
- Constant value set to
43054909. Tobacco smoking status
Comment or raise an issue for this mapping.
COSD V8 CR Observation Performance Status Adult
- Constant value set to
4309681. General physical performance status
Comment or raise an issue for this mapping.
COSD V8 CR Observation Cancer Treatment Intent
- Constant value set to
4194400. Treatment intent
Comment or raise an issue for this mapping.
COSD V8 CR Observation Alcohol History Cancer In Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
COSD V8 CR Observation Alcohol History Cancer Before Last Three Months
- Constant value set to
35609491. Alcohol units consumed per week
Comment or raise an issue for this mapping.
CosdV9HistoryOfAlcoholPast
- Constant value set to
2000500004. History Of Alcohol (Past)
Comment or raise an issue for this mapping.
CosdV9HistoryOfAlcoholCurrent
- Constant value set to
2000500003. History Of Alcohol (Current)
Comment or raise an issue for this mapping.
CosdV9FamilialCancerSyndrome
- Constant value set to
2000500005. Familial Cancer (Indicator)
Comment or raise an issue for this mapping.
CosdV9FamilialCancerSyndromeSubsidiaryComment
- Constant value set to
2000500006. Familial Cancer (Comment)
Comment or raise an issue for this mapping.
CosdV8FamilialCancerSyndromeIndicator
- Constant value set to
2000500005. Familial Cancer (Indicator)
Comment or raise an issue for this mapping.
CosdV8AlcoholHistoryCancerInLastThreeMonths
- Constant value set to
2000500003. History Of Alcohol (Current)
Comment or raise an issue for this mapping.
CosdV8AlcoholHistoryCancerBeforeLastThreeMonths
- Constant value set to
2000500004. History Of Alcohol (Past)
Comment or raise an issue for this mapping.
CosdV9BreastHistoryOfAlcoholPast
- Constant value set to
2000500004. History Of Alcohol (Past)
Comment or raise an issue for this mapping.
CosdV9BreastHistoryOfAlcoholCurrent
- Constant value set to
2000500003. History Of Alcohol (Current)
Comment or raise an issue for this mapping.
CosdV9BreastFamilialCancerSyndrome
- Constant value set to
2000500005. Familial Cancer (Indicator)
Comment or raise an issue for this mapping.
CosdV9BreastFamilialCancerSyndromeSubsidiaryComment
- Constant value set to
2000500006. Familial Cancer (Comment)
Comment or raise an issue for this mapping.
COSD V8 Breast Familial Cancer Syndrome Indicator
- Constant value set to
2000500005. Familial Cancer (Indicator)
Comment or raise an issue for this mapping.
COSD V9 BA Observation Performance Status Adult
- Constant value set to
4309681. General physical performance status
Comment or raise an issue for this mapping.
COSD V9 BA Observation Cancer Treatment Intent
- Constant value set to
4194400. Treatment intent
Comment or raise an issue for this mapping.
COSD V8 BA Observation Performance Status Adult
- Constant value set to
4309681. General physical performance status
Comment or raise an issue for this mapping.
COSD V8 BA Observation Cancer Treatment Intent
- Constant value set to
4194400. Treatment intent