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.
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.
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)