observation_source_value
SUS Outpatient Procedure Observation
-
Value copied from
PrimaryProcedure -
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
-
Value copied from
DiagnosisICD -
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
-
Value copied from
ObservationSourceValue -
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
-
Value copied from
PrimaryProcedure -
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
-
Value copied from
DiagnosisICD -
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.
SACT Clinical Trial
-
Value copied from
Source_value -
Source_valueSource value for the Systemic Anti-Cancer Therapy Data Set, CLINICAL TRIAL INDICATOR identifies if a PATIENT is currently in an active Systemic Anti-Cancer Therapy CLINICAL TRIAL CLINICAL TRIAL INDICATOR
select
distinct
replace(NHS_Number, ' ', '') as NHSNumber,
Clinical_Trial,
Case
When Clinical_Trial = 1 then concat(Clinical_Trial, ' - PATIENT is taking part in a CLINICAL TRIAL')
else '' end as Source_Value,
Administration_Date
from omop_staging.sact_staging
where Clinical_Trial = '1'
Comment or raise an issue for this mapping.
SNOMED CT procedures mapped to Observation from databricks_procedures.parquet.
-
Value copied from
clinical_code -
clinical_codeOriginal procedure code, preserved as the observation source value.
select
patient_identifier_value,
clinical_date,
clinical_datetime,
clinical_code,
trim(clinical_code) as concept_code
from ##duckdb_source##
where upper(trim(clinical_code_system)) = 'SNOMED CT'
order by all
Comment or raise an issue for this mapping.
OPCS4 procedures mapped to Observation from databricks_procedures.parquet.
-
Value copied from
clinical_code -
clinical_codeOriginal procedure code, preserved as the observation source value.
select
patient_identifier_value,
clinical_date,
clinical_datetime,
clinical_code,
replace(upper(trim(clinical_code)), '.', '') as concept_code
from ##duckdb_source##
where upper(trim(clinical_code_system)) = 'OPCS4'
order by all
Comment or raise an issue for this mapping.
Oxford Lab General Comment Observation
-
Value copied from
EVENT -
EVENTLab test event EVENT
select
NHS_NUMBER,
EVENT,
EVENT_START_DT_TM,
RESULT_VALUE
from ##duckdb_source##
where lower(EVENT) like '%comment%'
order by all
Comment or raise an issue for this mapping.
SNOMED CT diagnoses, including UK ED Subset, mapped to Observation from databricks_diagnosis.parquet.
-
Value copied from
diagnosis_code -
diagnosis_codeOriginal diagnosis code, preserved as the source value.
select
patient_identifier_value,
diagnosis_date,
diagnosis_datetime,
diagnosis_code,
trim(diagnosis_code) as concept_code
from ##duckdb_source##
where upper(trim(diagnosis_code_system)) = 'SNOMED CT'
order by diagnosis_id, warehouse_identifier
Comment or raise an issue for this mapping.
ICD-10 and ICD10 diagnoses mapped to Observation from databricks_diagnosis.parquet.
-
Value copied from
diagnosis_code -
diagnosis_codeOriginal diagnosis code, preserved as the source value.
select
patient_identifier_value,
diagnosis_date,
diagnosis_datetime,
diagnosis_code,
case when length(trim(diagnosis_code)) >= 3 then upper(trim(diagnosis_code)) end as concept_code
from ##duckdb_source##
where upper(trim(diagnosis_code_system)) in ('ICD-10', 'ICD10')
order by diagnosis_id, warehouse_identifier
Comment or raise an issue for this mapping.
COSD V9 UR Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension' as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed' as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.TobaccoSmokingStatus.@code' as SmokingStatusCancer
from omop_staging.cosd_staging_901
where type = 'UR'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 UR Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension' as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed' as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholPast.@code' as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_901
where type = 'UR'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 UR Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentRecent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension' as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed' as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholCurrent.@code' as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_901
where type = 'UR'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 UR Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.Urological.UrologicalCore.UrologicalCoreLinkagePatientId.NHSNumber.@extension' as NhsNumber,
Record ->> '$.Urological.UrologicalCore.UrologicalCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis' as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Urological.UrologicalCore.UrologicalCoreClinicalNurseSpecialistAndRiskFactorAssessments.SmokingStatusCode.@code' as SmokingStatusCancer
from omop_staging.cosd_staging_81
where type = 'UR'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 UR Observation Person Stated Sexual Orientation Code At Diagnosis
-
Value copied from
PersonStatedSexualOrientationCodeAtDiagnosis -
PersonStatedSexualOrientationCodeAtDiagnosisThe sexual orientation as self-stated by the person at the point of cancer diagnosis. PERSON STATED SEXUAL ORIENTATION CODE (AT DIAGNOSIS)
select distinct
Record ->> '$.Urological.UrologicalCore.UrologicalCoreLinkagePatientId.NHSNumber.@extension' as NhsNumber,
Record ->> '$.Urological.UrologicalCore.UrologicalCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis' as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Urological.UrologicalCore.UrologicalCoreDemographics.PersonStatedSexualOrientationCodeAtDiagnosis.@code' as PersonStatedSexualOrientationCodeAtDiagnosis
from omop_staging.cosd_staging_81
where type = 'UR'
and NhsNumber is not null
and PersonStatedSexualOrientationCodeAtDiagnosis is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 UR Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.Urological.UrologicalCore.UrologicalCoreLinkagePatientId.NHSNumber.@extension' as NhsNumber,
Record ->> '$.Urological.UrologicalCore.UrologicalCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis' as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Urological.UrologicalCore.UrologicalCoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerBeforeLastThreeMonths.@code' as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_81
where type = 'UR'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 UR Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentRecent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.Urological.UrologicalCore.UrologicalCoreLinkagePatientId.NHSNumber.@extension' as NhsNumber,
Record ->> '$.Urological.UrologicalCore.UrologicalCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis' as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Urological.UrologicalCore.UrologicalCoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerInLastThreeMonths.@code' as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_81
where type = 'UR'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 UG Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension' as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed' as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.TobaccoSmokingStatus.@code' as SmokingStatusCancer
from omop_staging.cosd_staging_901
where type = 'UG'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 UG Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension' as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed' as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholPast.@code' as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_901
where type = 'UG'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 UG Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentRecent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension' as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed' as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholCurrent.@code' as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_901
where type = 'UG'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 UG Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.UpperGI.UpperGICore.UpperGICoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.UpperGI.UpperGICore.UpperGICoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.UpperGI.UpperGICore.UpperGICoreClinicalNurseSpecialistAndRiskFactorAssessments.SmokingStatusCode.@code'
as SmokingStatusCancer
from omop_staging.cosd_staging_81
where type = 'UG'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 UG Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.UpperGI.UpperGICore.UpperGICoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.UpperGI.UpperGICore.UpperGICoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.UpperGI.UpperGICore.UpperGICoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerBeforeLastThreeMonths.@code'
as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_81
where type = 'UG'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 UG Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentRecent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.UpperGI.UpperGICore.UpperGICoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.UpperGI.UpperGICore.UpperGICoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.UpperGI.UpperGICore.UpperGICoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerInLastThreeMonths.@code'
as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_81
where type = 'UG'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 SK Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.TobaccoSmokingStatus.@code'
as SmokingStatusCancer
from omop_staging.cosd_staging_901
where type = 'SK'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 SK Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholPast.@code'
as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_901
where type = 'SK'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 SK Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentRecent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholCurrent.@code'
as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_901
where type = 'SK'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 SK Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.Skin.SkinCore.SkinCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Skin.SkinCore.SkinCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Skin.SkinCore.SkinCoreClinicalNurseSpecialistAndRiskFactorAssessments.SmokingStatusCode.@code'
as SmokingStatusCancer
from omop_staging.cosd_staging_81
where type = 'SK'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 SK Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.Skin.SkinCore.SkinCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Skin.SkinCore.SkinCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Skin.SkinCore.SkinCoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerBeforeLastThreeMonths.@code'
as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_81
where type = 'SK'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 SK Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentRecent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.Skin.SkinCore.SkinCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Skin.SkinCore.SkinCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Skin.SkinCore.SkinCoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerInLastThreeMonths.@code'
as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_81
where type = 'SK'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 SA Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.TobaccoSmokingStatus.@code'
as SmokingStatusCancer
from omop_staging.cosd_staging_901
where type = 'SA'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 SA Observation Sarcoma Tumour Site Soft Tissue
-
Value copied from
SarcomaTumourSiteSoftTissue -
SarcomaTumourSiteSoftTissueLocation of the soft tissue sarcoma within the body using an OPCS-4 code, at a more detailed level than ICD or ICD-O. SARCOMA TUMOUR SITE (SOFT TISSUE)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension' as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed' as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.PrimaryPathway.Diagnosis.DiagnosisBoneAndSoftTissue.SarcomaTumourSiteSoftTissue.@code' as SarcomaTumourSiteSoftTissue
from omop_staging.cosd_staging_901
where type = 'SA'
and SarcomaTumourSiteSoftTissue is not null;
Comment or raise an issue for this mapping.
COSD V9 SA Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholPast.@code'
as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_901
where type = 'SA'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 SA Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentCurrent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholCurrent.@code'
as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_901
where type = 'SA'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 SA Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.Sarcoma.SarcomaCore.SarcomaCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Sarcoma.SarcomaCore.SarcomaCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Sarcoma.SarcomaCore.SarcomaCoreClinicalNurseSpecialistAndRiskFactorAssessments.SmokingStatusCode.@code'
as SmokingStatusCancer
from omop_staging.cosd_staging_81
where type = 'SA'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 SA Observation Sarcoma Tumour Site Soft Tissue
-
Value copied from
SarcomaTumourSiteSoftTissue -
SarcomaTumourSiteSoftTissueLocation of the soft tissue sarcoma within the body using an OPCS-4 code, at a more detailed level than ICD or ICD-O. SARCOMA TUMOUR SITE (SOFT TISSUE)
with SA as (
select
Record ->> '$.Sarcoma.SarcomaCore.SarcomaCoreLinkagePatientId.NHSNumber.@extension' as NhsNumber,
Record ->> '$.Sarcoma.SarcomaCore.SarcomaCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis' as ClinicalDateCancerDiagnosis,
Record ->> '$.Sarcoma.SarcomaCore.SarcomaCoreDiagnosis.SarcomaDiagnosisBoneAndSoftTissue.SarcomaTumourSiteSoftTissue.@code' as SarcomaTumourSiteSoftTissue
from omop_staging.cosd_staging_81
where type = 'SA'
)
select distinct
NhsNumber,
ClinicalDateCancerDiagnosis,
SarcomaTumourSiteSoftTissue
from SA
where SarcomaTumourSiteSoftTissue is not null;
Comment or raise an issue for this mapping.
COSD V8 SA Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.Sarcoma.SarcomaCore.SarcomaCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Sarcoma.SarcomaCore.SarcomaCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Sarcoma.SarcomaCore.SarcomaCoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerBeforeLastThreeMonths.@code'
as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_81
where type = 'SA'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 SA Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentCurrent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.Sarcoma.SarcomaCore.SarcomaCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Sarcoma.SarcomaCore.SarcomaCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Sarcoma.SarcomaCore.SarcomaCoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerInLastThreeMonths.@code'
as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_81
where type = 'SA'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 LV Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.TobaccoSmokingStatus.@code'
as SmokingStatusCancer
from omop_staging.cosd_staging_901
where type = 'LV'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 LV Observation Performance Status Adult
-
Value copied from
PerformanceStatusAdult -
PerformanceStatusAdultA World Health Organisation classification indicating a person’s status relating to activity or disability. PERFORMANCE STATUS (ADULT)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.PrimaryPathway.Diagnosis.PerformanceStatusAdult.@code'
as PerformanceStatusAdult
from omop_staging.cosd_staging_901
where type = 'LV'
and NhsNumber is not null
and PerformanceStatusAdult is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null
and PerformanceStatusAdult in ('0', '1', '2', '3', '4');
Comment or raise an issue for this mapping.
COSD V9 LV Observation Cancer Treatment Intent
-
Value copied from
CancerTreatmentIntent -
CancerTreatmentIntentThe intention of the cancer treatment provided during a Cancer Care Spell. CANCER TREATMENT INTENT
with lv as (
select
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
unnest([
[Record ->> '$.Treatment.CancerTreatmentIntent.@code'],
Record ->> '$.Treatment[*].CancerTreatmentIntent.@code'
], recursive := true) as CancerTreatmentIntent,
unnest([
[Record ->> '$.Treatment.TreatmentStartDateCancer'],
Record ->> '$.Treatment[*].TreatmentStartDateCancer'
], recursive := true) as TreatmentStartDateCancer
from omop_staging.cosd_staging_901
where type = 'LV'
)
select distinct
NhsNumber,
TreatmentStartDateCancer,
CancerTreatmentIntent
from lv
where NhsNumber is not null
and CancerTreatmentIntent is not null
and TreatmentStartDateCancer is not null;
Comment or raise an issue for this mapping.
COSD V8 LV Observation Performance Status Adult
-
Value copied from
PerformanceStatusAdult -
PerformanceStatusAdultA World Health Organisation classification indicating a person’s status relating to activity or disability. PERFORMANCE STATUS (ADULT)
select distinct
Record ->> '$.Liver.LiverCore.LiverCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Liver.LiverCore.LiverCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Liver.LiverCore.LiverCoreDiagnosis.AdultPerformanceStatus.@code'
as PerformanceStatusAdult
from omop_staging.cosd_staging_81
where type = 'LV'
and NhsNumber is not null
and PerformanceStatusAdult is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null
and PerformanceStatusAdult in ('0', '1', '2', '3', '4');
Comment or raise an issue for this mapping.
COSD V8 LV Observation Cancer Treatment Intent
-
Value copied from
CancerTreatmentIntent -
CancerTreatmentIntentThe intention of the cancer treatment provided during a Cancer Care Spell. CANCER TREATMENT INTENT
with lv as (
select
Record ->> '$.Liver.LiverCore.LiverCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
unnest(
[
[ Record ->> '$.Liver.LiverCore.LiverCoreTreatment.CancerTreatmentIntent.@code' ],
Record ->> '$.Liver.LiverCore.LiverCoreTreatment[*].CancerTreatmentIntent.@code'
],
recursive := true
) as CancerTreatmentIntent,
unnest(
[
[ Record ->> '$.Liver.LiverCore.LiverCoreTreatment.CancerTreatmentStartDate' ],
Record ->> '$.Liver.LiverCore.LiverCoreTreatment[*].CancerTreatmentStartDate'
],
recursive := true
) as TreatmentStartDateCancer
from omop_staging.cosd_staging_81
where type = 'LV'
)
select distinct
NhsNumber,
TreatmentStartDateCancer,
CancerTreatmentIntent
from lv
where NhsNumber is not null
and CancerTreatmentIntent is not null
and TreatmentStartDateCancer is not null;
Comment or raise an issue for this mapping.
CosdV9LungTobaccoSmokingCessation
-
Value copied from
TobaccoSmokingCessation -
TobaccoSmokingCessationSMOKING CESSATION (CANCER) is for use in the Cancer Outcomes and Services Data Set: Core to identify the patient’s current smoking cessation support during a Cancer Care Spell. SMOKING CESSATION (CANCER)
with LU as (
select
Record ->> '$.PrimaryPathway.ReferralAndFirstStageOfPatientPathway.DateFirstSeen' as DateFirstSeen,
Record ->> '$.PrimaryPathway.ReferralAndFirstStageOfPatientPathway.DateFirstSeenCancerSpecialist' as DateFirstSeenCancerSpecialist,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed' as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.PrimaryPathway.Staging.StageDateFinalPretreatmentStage' as StageDateFinalPretreatmentStage,
Record ->> '$.PrimaryPathway.Staging.StageDateIntegratedStage' as StageDateIntegratedStage,
Record ->> '$.Treatment.TreatmentStartDateCancer' as TreatmentStartDateCancer,
Record ->> '$.Treatment.Surgery.ProcedureDate' as ProcedureDate,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.TobaccoSmokingCessation.@code' as TobaccoSmokingCessation,
Record ->> '$.LinkagePatientId.NhsNumber.@extension' as NhsNumber
from omop_staging.cosd_staging_901
where type = 'LU'
)
select
distinct
TobaccoSmokingCessation,
NhsNumber,
least(
cast(DateFirstSeen as date),
cast(DateFirstSeenCancerSpecialist as date),
cast(DateOfPrimaryDiagnosisClinicallyAgreed as date),
cast(StageDateFinalPretreatmentStage as date),
cast(nullif(StageDateIntegratedStage, '') as date),
cast(TreatmentStartDateCancer as date),
cast(ProcedureDate as date)
) as Date
from LU o
where o.TobaccoSmokingCessation is not null
and o.TobaccoSmokingCessation = '3'
and not (
DateFirstSeen is null and
DateFirstSeenCancerSpecialist is null and
DateOfPrimaryDiagnosisClinicallyAgreed is null and
StageDateFinalPretreatmentStage is null and
StageDateIntegratedStage is null and
TreatmentStartDateCancer is null and
ProcedureDate is null
)
Comment or raise an issue for this mapping.
CosdV9LungAsaScore
Source column AsaScore. Lookup ASA score description concept.
| AsaScore | observation_source_value | notes |
|---|---|---|
| 1 | 653309 | ASA 1 - A normal healthy patient. |
| 2 | 652943 | ASA 2 - A patient with mild systemic disease. |
| 3 | 654324 | ASA 3 - A patient with severe systemic disease. |
| 4 | 652750 | ASA 4 - A patient with poorly controlled systemic disease. |
| 5 | 652861 | ASA 5 - A patient with a moribund condition that is not expected to survive without the operation. |
| 6 | ASA 6 - A declared brain-dead patient whose organs are being removed for donor purposes |
Notes
-
[ASA Score](https://digital.nhs.uk/ndrs/data/data-sets/cosd/cosd-user-guide-v10/core—treatment
-
AsaScoreThe physical status of the PATIENT as recorded by an anaesthetist for the operative procedure. ASA PHYSICAL STATUS CLASSIFICATION SYSTEM CODE
with LU as (
select
Record ->> '$.PrimaryPathway.ReferralAndFirstStageOfPatientPathway.DateFirstSeen' as DateFirstSeen,
Record ->> '$.PrimaryPathway.ReferralAndFirstStageOfPatientPathway.DateFirstSeenCancerSpecialist' as DateFirstSeenCancerSpecialist,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed' as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.PrimaryPathway.Staging.StageDateFinalPretreatmentStage' as StageDateFinalPretreatmentStage,
Record ->> '$.PrimaryPathway.Staging.StageDateIntegratedStage' as StageDateIntegratedStage,
Record ->> '$.Treatment.TreatmentStartDateCancer' as TreatmentStartDateCancer,
Record ->> '$.Treatment.Surgery.ProcedureDate' as ProcedureDate,
Record ->> '$.Treatment.Surgery.AsaScore.@code' as AsaScore,
Record ->> '$.LinkagePatientId.NhsNumber.@extension' as NhsNumber
from omop_staging.cosd_staging_901
where type = 'LU'
)
select
distinct
AsaScore,
NhsNumber,
least(
cast(DateFirstSeen as date),
cast(DateFirstSeenCancerSpecialist as date),
cast(DateOfPrimaryDiagnosisClinicallyAgreed as date),
cast(StageDateFinalPretreatmentStage as date),
cast(nullif(StageDateIntegratedStage, '') as date),
cast(TreatmentStartDateCancer as date),
cast(ProcedureDate as date)
) as Date
from LU o
where o.AsaScore is not null
and not (
DateFirstSeen is null and
DateFirstSeenCancerSpecialist is null and
DateOfPrimaryDiagnosisClinicallyAgreed is null and
StageDateFinalPretreatmentStage is null and
StageDateIntegratedStage is null and
TreatmentStartDateCancer is null and
ProcedureDate is null
)
Comment or raise an issue for this mapping.
CosdV8LungPersonStatedSexualOrientationCodeAtDiagnosis
-
Value copied from
PersonStatedSexualOrientationCodeAtDiagnosis -
PersonStatedSexualOrientationCodeAtDiagnosisThe sexual orientation of a PERSON at the time of diagnosis. PERSON STATED SEXUAL ORIENTATION CODE AT DIAGNOSIS
with LU as (
select
Record ->> '$.Lung.LungCore.LungCoreDemographics.PersonStatedSexualOrientationCodeAtDiagnosis.@code' as PersonStatedSexualOrientationCodeAtDiagnosis,
Record ->> '$.Lung.LungCore.LungCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis' as ClinicalDateCancerDiagnosis,
Record ->> '$.Lung.LungCore.LungCoreTreatment.LungCoreSurgeryAndOtherProcedures.ProcedureDate' as ProcedureDate,
unnest ([[Record ->> '$.Lung.LungCore.LungCoreTreatment.CancerTreatmentStartDate'], Record ->> '$.Lung.LungCore.LungCoreTreatment[*].CancerTreatmentStartDate'], recursive := true) as CancerTreatmentStartDate,
Record ->> '$.Lung.LungCore.LungCoreLinkagePatientId.NHSNumber.@extension' as NhsNumber
from omop_staging.cosd_staging_81
where Type = 'LU'
)
select
distinct
PersonStatedSexualOrientationCodeAtDiagnosis,
NhsNumber,
least(
cast (ClinicalDateCancerDiagnosis as date),
cast (ProcedureDate as date),
cast (CancerTreatmentStartDate as date)
) as Date
from LU o
where o.PersonStatedSexualOrientationCodeAtDiagnosis is not null
and not (
ClinicalDateCancerDiagnosis is null and
ProcedureDate is null and
CancerTreatmentStartDate is null
)
Comment or raise an issue for this mapping.
COSD V9 HN Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.TobaccoSmokingStatus.@code'
as SmokingStatusCancer
from omop_staging.cosd_staging_901
where type = 'HN'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 HN Observation Performance Status Adult
-
Value copied from
PerformanceStatusAdult -
PerformanceStatusAdultA World Health Organisation classification indicating a person’s status relating to activity or disability. PERFORMANCE STATUS (ADULT)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.PrimaryPathway.Diagnosis.PerformanceStatusAdult.@code'
as PerformanceStatusAdult
from omop_staging.cosd_staging_901
where type = 'HN'
and NhsNumber is not null
and PerformanceStatusAdult is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null
and PerformanceStatusAdult in ('0', '1', '2', '3', '4');
Comment or raise an issue for this mapping.
COSD V9 HN Observation Cancer Treatment Intent
-
Value copied from
CancerTreatmentIntent -
CancerTreatmentIntentThe intention of the cancer treatment provided during a Cancer Care Spell. CANCER TREATMENT INTENT
with hn as (
select
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
unnest([
[Record ->> '$.Treatment.CancerTreatmentIntent.@code'],
Record ->> '$.Treatment[*].CancerTreatmentIntent.@code'
], recursive := true) as CancerTreatmentIntent,
unnest([
[Record ->> '$.Treatment.TreatmentStartDateCancer'],
Record ->> '$.Treatment[*].TreatmentStartDateCancer'
], recursive := true) as TreatmentStartDateCancer
from omop_staging.cosd_staging_901
where type = 'HN'
)
select distinct
NhsNumber,
TreatmentStartDateCancer,
CancerTreatmentIntent
from hn
where NhsNumber is not null
and CancerTreatmentIntent is not null
and TreatmentStartDateCancer is not null;
Comment or raise an issue for this mapping.
COSD V9 HN Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholPast.@code'
as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_901
where type = 'HN'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 HN Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentCurrent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholCurrent.@code'
as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_901
where type = 'HN'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 HN Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreClinicalNurseSpecialistAndRiskFactorAssessments.SmokingStatusCode.@code'
as SmokingStatusCancer
from omop_staging.cosd_staging_81
where type = 'HN'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 HN Observation Performance Status Adult
-
Value copied from
PerformanceStatusAdult -
PerformanceStatusAdultA World Health Organisation classification indicating a person’s status relating to activity or disability. PERFORMANCE STATUS (ADULT)
select distinct
Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreDiagnosis.AdultPerformanceStatus.@code'
as PerformanceStatusAdult
from omop_staging.cosd_staging_81
where type = 'HN'
and NhsNumber is not null
and PerformanceStatusAdult is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null
and PerformanceStatusAdult in ('0', '1', '2', '3', '4');
Comment or raise an issue for this mapping.
COSD V8 HN Observation Cancer Treatment Intent
-
Value copied from
CancerTreatmentIntent -
CancerTreatmentIntentThe intention of the cancer treatment provided during a Cancer Care Spell. CANCER TREATMENT INTENT
with hn as (
select
Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
unnest(
[
[ Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreTreatment.CancerTreatmentIntent.@code' ],
Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreTreatment[*].CancerTreatmentIntent.@code'
],
recursive := true
) as CancerTreatmentIntent,
unnest(
[
[ Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreTreatment.CancerTreatmentStartDate' ],
Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreTreatment[*].CancerTreatmentStartDate'
],
recursive := true
) as TreatmentStartDateCancer
from omop_staging.cosd_staging_81
where type = 'HN'
)
select distinct
NhsNumber,
TreatmentStartDateCancer,
CancerTreatmentIntent
from hn
where NhsNumber is not null
and CancerTreatmentIntent is not null
and TreatmentStartDateCancer is not null;
Comment or raise an issue for this mapping.
COSD V8 HN Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerBeforeLastThreeMonths.@code'
as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_81
where type = 'HN'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 HN Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentCurrent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.HeadNeck.HeadNeckCore.HeadNeckCoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerInLastThreeMonths.@code'
as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_81
where type = 'HN'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 HA Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.TobaccoSmokingStatus.@code'
as SmokingStatusCancer
from omop_staging.cosd_staging_901
where type = 'HA'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 HA Observation Performance Status Adult
-
Value copied from
PerformanceStatusAdult -
PerformanceStatusAdultA World Health Organisation classification indicating a person’s status relating to activity or disability. PERFORMANCE STATUS (ADULT)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.PrimaryPathway.Diagnosis.PerformanceStatusAdult.@code'
as PerformanceStatusAdult
from omop_staging.cosd_staging_901
where type = 'HA'
and NhsNumber is not null
and PerformanceStatusAdult is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null
and PerformanceStatusAdult in ('0', '1', '2', '3', '4');
Comment or raise an issue for this mapping.
COSD V9 HA Observation Cancer Treatment Intent
-
Value copied from
CancerTreatmentIntent -
CancerTreatmentIntentThe intention of the cancer treatment provided during a Cancer Care Spell. CANCER TREATMENT INTENT
with ha as (
select
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
unnest([
[Record ->> '$.Treatment.CancerTreatmentIntent.@code'],
Record ->> '$.Treatment[*].CancerTreatmentIntent.@code'
], recursive := true) as CancerTreatmentIntent,
unnest([
[Record ->> '$.Treatment.TreatmentStartDateCancer'],
Record ->> '$.Treatment[*].TreatmentStartDateCancer'
], recursive := true) as TreatmentStartDateCancer
from omop_staging.cosd_staging_901
where type = 'HA'
)
select distinct
NhsNumber,
TreatmentStartDateCancer,
CancerTreatmentIntent
from ha
where NhsNumber is not null
and CancerTreatmentIntent is not null
and TreatmentStartDateCancer is not null;
Comment or raise an issue for this mapping.
COSD V9 HA Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholPast.@code'
as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_901
where type = 'HA'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 HA Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentCurrent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholCurrent.@code'
as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_901
where type = 'HA'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 HA Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreClinicalNurseSpecialistAndRiskFactorAssessments.SmokingStatusCode.@code'
as SmokingStatusCancer
from omop_staging.cosd_staging_81
where type = 'HA'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 HA Observation Performance Status Adult
-
Value copied from
PerformanceStatusAdult -
PerformanceStatusAdultA World Health Organisation classification indicating a person’s status relating to activity or disability. PERFORMANCE STATUS (ADULT)
select distinct
Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreDiagnosis.AdultPerformanceStatus.@code'
as PerformanceStatusAdult
from omop_staging.cosd_staging_81
where type = 'HA'
and NhsNumber is not null
and PerformanceStatusAdult is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null
and PerformanceStatusAdult in ('0', '1', '2', '3', '4');
Comment or raise an issue for this mapping.
COSD V8 HA Observation Cancer Treatment Intent
-
Value copied from
CancerTreatmentIntent -
CancerTreatmentIntentThe intention of the cancer treatment provided during a Cancer Care Spell. CANCER TREATMENT INTENT
with ha as (
select
Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
unnest(
[
[ Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreTreatment.CancerTreatmentIntent.@code' ],
Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreTreatment[*].CancerTreatmentIntent.@code'
],
recursive := true
) as CancerTreatmentIntent,
unnest(
[
[ Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreTreatment.CancerTreatmentStartDate' ],
Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreTreatment[*].CancerTreatmentStartDate'
],
recursive := true
) as TreatmentStartDateCancer
from omop_staging.cosd_staging_81
where type = 'HA'
)
select distinct
NhsNumber,
TreatmentStartDateCancer,
CancerTreatmentIntent
from ha
where NhsNumber is not null
and CancerTreatmentIntent is not null
and TreatmentStartDateCancer is not null;
Comment or raise an issue for this mapping.
COSD V8 HA Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerBeforeLastThreeMonths.@code'
as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_81
where type = 'HA'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 HA Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentCurrent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Haematological.HaematologicalCore.HaematologicalCoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerInLastThreeMonths.@code'
as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_81
where type = 'HA'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 GY Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.TobaccoSmokingStatus.@code'
as SmokingStatusCancer
from omop_staging.cosd_staging_901
where type = 'GY'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 GY Observation Performance Status Adult
-
Value copied from
PerformanceStatusAdult -
PerformanceStatusAdultA World Health Organisation classification indicating a person’s status relating to activity or disability. PERFORMANCE STATUS (ADULT)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.PrimaryPathway.Diagnosis.PerformanceStatusAdult.@code'
as PerformanceStatusAdult
from omop_staging.cosd_staging_901
where type = 'GY'
and NhsNumber is not null
and PerformanceStatusAdult is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null
and PerformanceStatusAdult in ('0', '1', '2', '3', '4');
Comment or raise an issue for this mapping.
COSD V9 GY Observation Cancer Treatment Intent
-
Value copied from
CancerTreatmentIntent -
CancerTreatmentIntentThe intention of the cancer treatment provided during a Cancer Care Spell. CANCER TREATMENT INTENT
with gy as (
select
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
unnest([
[Record ->> '$.Treatment.CancerTreatmentIntent.@code'],
Record ->> '$.Treatment[*].CancerTreatmentIntent.@code'
], recursive := true) as CancerTreatmentIntent,
unnest([
[Record ->> '$.Treatment.TreatmentStartDateCancer'],
Record ->> '$.Treatment[*].TreatmentStartDateCancer'
], recursive := true) as TreatmentStartDateCancer
from omop_staging.cosd_staging_901
where type = 'GY'
)
select distinct
NhsNumber,
TreatmentStartDateCancer,
CancerTreatmentIntent
from gy
where NhsNumber is not null
and CancerTreatmentIntent is not null
and TreatmentStartDateCancer is not null;
Comment or raise an issue for this mapping.
COSD V9 GY Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholPast.@code'
as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_901
where type = 'GY'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 GY Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentCurrent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholCurrent.@code'
as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_901
where type = 'GY'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 GY Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreClinicalNurseSpecialistAndRiskFactorAssessments.SmokingStatusCode.@code'
as SmokingStatusCancer
from omop_staging.cosd_staging_81
where type = 'GY'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 GY Observation Performance Status Adult
-
Value copied from
PerformanceStatusAdult -
PerformanceStatusAdultA World Health Organisation classification indicating a person’s status relating to activity or disability. PERFORMANCE STATUS (ADULT)
select distinct
Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreDiagnosis.AdultPerformanceStatus.@code'
as PerformanceStatusAdult
from omop_staging.cosd_staging_81
where type = 'GY'
and NhsNumber is not null
and PerformanceStatusAdult is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null
and PerformanceStatusAdult in ('0', '1', '2', '3', '4');
Comment or raise an issue for this mapping.
COSD V8 GY Observation Cancer Treatment Intent
-
Value copied from
CancerTreatmentIntent -
CancerTreatmentIntentThe intention of the cancer treatment provided during a Cancer Care Spell. CANCER TREATMENT INTENT
with gy as (
select distinct
Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
unnest(
[
[ Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreTreatment.CancerTreatmentStartDate' ],
Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreTreatment[*].CancerTreatmentStartDate'
],
recursive := true
) as TreatmentStartDateCancer,
unnest(
[
[ Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreTreatment.CancerTreatmentIntent.@code' ],
Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreTreatment[*].CancerTreatmentIntent.@code'
],
recursive := true
) as CancerTreatmentIntent
from omop_staging.cosd_staging_81
where type = 'GY'
)
select distinct
NhsNumber,
TreatmentStartDateCancer,
CancerTreatmentIntent
from gy
where NhsNumber is not null
and CancerTreatmentIntent is not null
and TreatmentStartDateCancer is not null;
Comment or raise an issue for this mapping.
COSD V8 GY Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerBeforeLastThreeMonths.@code'
as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_81
where type = 'GY'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 GY Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentCurrent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Gynaecological.GynaecologicalCore.GynaecologicalCoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerInLastThreeMonths.@code'
as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_81
where type = 'GY'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 CT Observation Tobacco Smoking Cessation Treatment Indication Code
-
Value copied from
TobaccoSmokingCessationTreatmentIndicationCode -
TobaccoSmokingCessationTreatmentIndicationCodeIndication of whether treatment was given to the patient for tobacco smoking cessation. TOBACCO SMOKING CESSATION TREATMENT INDICATION CODE
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.TobaccoSmokingCessation.@code'
as TobaccoSmokingCessationTreatmentIndicationCode
from omop_staging.cosd_staging_901
where type = 'CT'
and NhsNumber is not null
and TobaccoSmokingCessationTreatmentIndicationCode is not null
and TobaccoSmokingCessationTreatmentIndicationCode = '3'
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 CT Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.TobaccoSmokingStatus.@code'
as SmokingStatusCancer
from omop_staging.cosd_staging_901
where type = 'CT'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 CT Observation Performance Status Adult
-
Value copied from
PerformanceStatusAdult -
PerformanceStatusAdultA World Health Organisation classification indicating a person’s status relating to activity or disability. PERFORMANCE STATUS (ADULT)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.PrimaryPathway.Diagnosis.PerformanceStatusAdult.@code'
as PerformanceStatusAdult
from omop_staging.cosd_staging_901
where type = 'CT'
and NhsNumber is not null
and PerformanceStatusAdult is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null
and PerformanceStatusAdult in ('0', '1', '2', '3', '4');
Comment or raise an issue for this mapping.
COSD V9 CT Observation Cancer Treatment Intent
-
Value copied from
CancerTreatmentIntent -
CancerTreatmentIntentThe intention of the cancer treatment provided during a Cancer Care Spell. CANCER TREATMENT INTENT
with ct as (
select
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
unnest([
[Record ->> '$.Treatment.CancerTreatmentIntent.@code'],
Record ->> '$.Treatment[*].CancerTreatmentIntent.@code'
], recursive := true) as CancerTreatmentIntent,
unnest([
[Record ->> '$.Treatment.TreatmentStartDateCancer'],
Record ->> '$.Treatment[*].TreatmentStartDateCancer'
], recursive := true) as TreatmentStartDateCancer
from omop_staging.cosd_staging_901
where type = 'CT'
)
select distinct
NhsNumber,
TreatmentStartDateCancer,
CancerTreatmentIntent
from ct
where NhsNumber is not null
and CancerTreatmentIntent is not null
and TreatmentStartDateCancer is not null;
Comment or raise an issue for this mapping.
COSD V9 CT Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholPast.@code'
as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_901
where type = 'CT'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 CT Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentCurrent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholCurrent.@code'
as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_901
where type = 'CT'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 CT Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.CTYA.CTYACore.CTYACoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.CTYA.CTYACore.CTYACoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.CTYA.CTYACore.CTYACoreClinicalNurseSpecialistAndRiskFactorAssessments.SmokingStatusCode.@code'
as SmokingStatusCancer
from omop_staging.cosd_staging_81
where type = 'CT'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 CT Observation Performance Status Adult
-
Value copied from
PerformanceStatusAdult -
PerformanceStatusAdultA World Health Organisation classification indicating a person’s status relating to activity or disability. PERFORMANCE STATUS (ADULT)
select distinct
Record ->> '$.CTYA.CTYACore.CTYACoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.CTYA.CTYACore.CTYACoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.CTYA.CTYACore.CTYACoreDiagnosis.AdultPerformanceStatus.@code'
as PerformanceStatusAdult
from omop_staging.cosd_staging_81
where type = 'CT'
and NhsNumber is not null
and PerformanceStatusAdult is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null
and PerformanceStatusAdult in ('0', '1', '2', '3', '4');
Comment or raise an issue for this mapping.
COSD V8 CT Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.CTYA.CTYACore.CTYACoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.CTYA.CTYACore.CTYACoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.CTYA.CTYACore.CTYACoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerBeforeLastThreeMonths.@code'
as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_81
where type = 'CT'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 CT Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentCurrent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.CTYA.CTYACore.CTYACoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.CTYA.CTYACore.CTYACoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.CTYA.CTYACore.CTYACoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerInLastThreeMonths.@code'
as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_81
where type = 'CT'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 CR Observation Tobacco Smoking Cessation Treatment Indication Code
-
Value copied from
TobaccoSmokingCessationTreatmentIndicationCode -
TobaccoSmokingCessationTreatmentIndicationCodeIndication of whether treatment was given to the patient for tobacco smoking cessation. TOBACCO SMOKING CESSATION TREATMENT INDICATION CODE
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.TobaccoSmokingCessation.@code'
as TobaccoSmokingCessationTreatmentIndicationCode
from omop_staging.cosd_staging_901
where type = 'CR'
and NhsNumber is not null
and TobaccoSmokingCessationTreatmentIndicationCode is not null
and TobaccoSmokingCessationTreatmentIndicationCode = '3'
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 CR Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.TobaccoSmokingStatus.@code'
as SmokingStatusCancer
from omop_staging.cosd_staging_901
where type = 'CR'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 CR Observation Performance Status Adult
-
Value copied from
PerformanceStatusAdult -
PerformanceStatusAdultA World Health Organisation classification indicating a person’s status relating to activity or disability. PERFORMANCE STATUS (ADULT)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.PrimaryPathway.Diagnosis.PerformanceStatusAdult.@code'
as PerformanceStatusAdult
from omop_staging.cosd_staging_901
where type = 'CR'
and NhsNumber is not null
and PerformanceStatusAdult is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null
and PerformanceStatusAdult in ('0', '1', '2', '3', '4');
Comment or raise an issue for this mapping.
COSD V9 CR Observation Cancer Treatment Intent
-
Value copied from
CancerTreatmentIntent -
CancerTreatmentIntentThe intention of the cancer treatment provided during a Cancer Care Spell. CANCER TREATMENT INTENT
with cr as (
select
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
unnest([
[Record ->> '$.Treatment.CancerTreatmentIntent.@code'],
Record ->> '$.Treatment[*].CancerTreatmentIntent.@code'
], recursive := true) as CancerTreatmentIntent,
unnest([
[Record ->> '$.Treatment.TreatmentStartDateCancer'],
Record ->> '$.Treatment[*].TreatmentStartDateCancer'
], recursive := true) as TreatmentStartDateCancer
from omop_staging.cosd_staging_901
where type = 'CR'
)
select distinct
NhsNumber,
TreatmentStartDateCancer,
CancerTreatmentIntent
from cr
where NhsNumber is not null
and CancerTreatmentIntent is not null
and TreatmentStartDateCancer is not null;
Comment or raise an issue for this mapping.
COSD V9 CR Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholPast.@code'
as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_901
where type = 'CR'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V9 CR Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentCurrent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.ClinicalNurseSpecialistAndRiskFactorAssessments.HistoryOfAlcoholCurrent.@code'
as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_901
where type = 'CR'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 CR Observation Smoking Status Cancer
-
Value copied from
SmokingStatusCancer -
SmokingStatusCancerUsed in the Cancer Outcomes and Services Data Set: Core to identify if the patient smokes tobacco only. SMOKING STATUS (CANCER)
select distinct
Record ->> '$.Core.CoreCore.CoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Core.CoreCore.CoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Core.CoreCore.CoreClinicalNurseSpecialistAndRiskFactorAssessments.SmokingStatusCode.@code'
as SmokingStatusCancer
from omop_staging.cosd_staging_81
where type = 'CR'
and NhsNumber is not null
and SmokingStatusCancer is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 CR Observation Performance Status Adult
-
Value copied from
PerformanceStatusAdult -
PerformanceStatusAdultA World Health Organisation classification indicating a person’s status relating to activity or disability. PERFORMANCE STATUS (ADULT)
select distinct
Record ->> '$.Core.CoreCore.CoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Core.CoreCore.CoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Core.CoreCore.CoreDiagnosis.AdultPerformanceStatus.@code'
as PerformanceStatusAdult
from omop_staging.cosd_staging_81
where type = 'CR'
and NhsNumber is not null
and PerformanceStatusAdult is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null
and PerformanceStatusAdult in ('0', '1', '2', '3', '4');
Comment or raise an issue for this mapping.
COSD V8 CR Observation Cancer Treatment Intent
-
Value copied from
CancerTreatmentIntent -
CancerTreatmentIntentThe intention of the cancer treatment provided during a Cancer Care Spell. CANCER TREATMENT INTENT
with cr as (
select
Record ->> '$.Core.CoreCore.CoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
unnest([
[Record ->> '$.Core.CoreCore.CoreTreatment.CancerTreatmentIntent.@code'],
Record ->> '$.Core.CoreCore.CoreTreatment[*].CancerTreatmentIntent.@code'
], recursive := true) as CancerTreatmentIntent,
unnest([
[Record ->> '$.Core.CoreCore.CoreTreatment.CancerTreatmentStartDate'],
Record ->> '$.Core.CoreCore.CoreTreatment[*].CancerTreatmentStartDate'
], recursive := true) as TreatmentStartDateCancer
from omop_staging.cosd_staging_81
where type = 'CR'
)
select distinct
NhsNumber,
TreatmentStartDateCancer,
CancerTreatmentIntent
from cr
where NhsNumber is not null
and CancerTreatmentIntent is not null
and TreatmentStartDateCancer is not null;
Comment or raise an issue for this mapping.
COSD V8 CR Observation Alcohol History Cancer Before Last Three Months
-
Value copied from
AlcoholHistoryCancerPast -
AlcoholHistoryCancerPastPast history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER BEFORE LAST THREE MONTHS)
select distinct
Record ->> '$.Core.CoreCore.CoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Core.CoreCore.CoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Core.CoreCore.CoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerBeforeLastThreeMonths.@code'
as AlcoholHistoryCancerPast
from omop_staging.cosd_staging_81
where type = 'CR'
and NhsNumber is not null
and AlcoholHistoryCancerPast is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
COSD V8 CR Observation Alcohol History Cancer In Last Three Months
-
Value copied from
AlcoholHistoryCancerCurrent -
AlcoholHistoryCancerCurrentCurrent history of alcohol consumption for the patient during a cancer care spell. ALCOHOL HISTORY (CANCER IN LAST THREE MONTHS)
select distinct
Record ->> '$.Core.CoreCore.CoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.Core.CoreCore.CoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.Core.CoreCore.CoreClinicalNurseSpecialistAndRiskFactorAssessments.AlcoholHistoryCancerInLastThreeMonths.@code'
as AlcoholHistoryCancerCurrent
from omop_staging.cosd_staging_81
where type = 'CR'
and NhsNumber is not null
and AlcoholHistoryCancerCurrent is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null;
Comment or raise an issue for this mapping.
CosdV9PersonSexualOrientationCodeAtDiagnosis
-
Value copied from
PersonSexualOrientationCodeAtDiagnosis -
PersonSexualOrientationCodeAtDiagnosisPERSON STATED SEXUAL ORIENTATION CODE (AT DIAGNOSIS) is the PERSON STATED SEXUAL ORIENTATION CODE at the time of the PATIENT DIAGNOSIS. PERSON STATED SEXUAL ORIENTATION CODE (AT DIAGNOSIS)
with CO as (
select
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed' as DateOfPrimaryDiagnosisClinicallyAgreed,
coalesce(Record ->> '$.Treatment[0].TreatmentStartDateCancer', Record ->> '$.Treatment.TreatmentStartDateCancer') as TreatmentStartDateCancer,
coalesce(Record ->> '$.Treatment[0].Surgery.ProcedureDate', Record ->> '$.Treatment.Surgery.ProcedureDate') as ProcedureDate,
Record ->> '$.Demographics.PersonSexualOrientationCodeAtDiagnosis.@code' as PersonSexualOrientationCodeAtDiagnosis,
Record ->> '$.LinkagePatientId.NhsNumber.@extension' as NhsNumber
from omop_staging.cosd_staging_901
where type = 'CO'
)
select
distinct
PersonSexualOrientationCodeAtDiagnosis,
NhsNumber,
least(
cast(DateOfPrimaryDiagnosisClinicallyAgreed as date),
cast(TreatmentStartDateCancer as date),
cast(ProcedureDate as date)
) as Date
from CO o
where o.PersonSexualOrientationCodeAtDiagnosis is not null
and not (
DateOfPrimaryDiagnosisClinicallyAgreed is null and
TreatmentStartDateCancer is null and
ProcedureDate is null
);
Comment or raise an issue for this mapping.
CosdV9AsaScore
Source column AsaScore. Lookup ASA score description concept.
| AsaScore | observation_source_value | notes |
|---|---|---|
| 1 | 653309 | ASA 1 - A normal healthy patient. |
| 2 | 652943 | ASA 2 - A patient with mild systemic disease. |
| 3 | 654324 | ASA 3 - A patient with severe systemic disease. |
| 4 | 652750 | ASA 4 - A patient with poorly controlled systemic disease. |
| 5 | 652861 | ASA 5 - A patient with a moribund condition that is not expected to survive without the operation. |
| 6 | ASA 6 - A declared brain-dead patient whose organs are being removed for donor purposes |
Notes
-
[ASA Score](https://digital.nhs.uk/ndrs/data/data-sets/cosd/cosd-user-guide-v10/core—treatment
-
AsaScoreThe physical status of the PATIENT as recorded by an anaesthetist for the operative procedure. ASA PHYSICAL STATUS CLASSIFICATION SYSTEM CODE
with CO as (
select
Record ->> '$.PrimaryPathway.ReferralAndFirstStageOfPatientPathway.DateFirstSeen' as DateFirstSeen,
Record ->> '$.PrimaryPathway.ReferralAndFirstStageOfPatientPathway.DateFirstSeenCancerSpecialist' as DateFirstSeenCancerSpecialist,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed' as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.PrimaryPathway.Staging.StageDateFinalPretreatmentStage' as StageDateFinalPretreatmentStage,
Record ->> '$.PrimaryPathway.Staging.StageDateIntegratedStage' as StageDateIntegratedStage,
coalesce(Record ->> '$.Treatment[0].TreatmentStartDateCancer', Record ->> '$.Treatment.TreatmentStartDateCancer') as TreatmentStartDateCancer,
coalesce(Record ->> '$.Treatment[0].Surgery.ProcedureDate', Record ->> '$.Treatment.Surgery.ProcedureDate') as ProcedureDate,
coalesce(Record ->> '$.Treatment[0].Surgery.AsaScore.@code', Record ->> '$.Treatment.Surgery.AsaScore.@code') as AsaScore,
Record ->> '$.LinkagePatientId.NhsNumber.@extension' as NhsNumber
from omop_staging.cosd_staging_901
where type = 'CO'
)
select
distinct
AsaScore,
NhsNumber,
least(
cast(DateFirstSeen as date),
cast(DateFirstSeenCancerSpecialist as date),
cast(DateOfPrimaryDiagnosisClinicallyAgreed as date),
cast(StageDateFinalPretreatmentStage as date),
cast(nullif(StageDateIntegratedStage, '') as date),
cast(TreatmentStartDateCancer as date),
cast(ProcedureDate as date)
) as Date
from CO o
where o.AsaScore is not null
and not (
DateFirstSeen is null and
DateFirstSeenCancerSpecialist is null and
DateOfPrimaryDiagnosisClinicallyAgreed is null and
StageDateFinalPretreatmentStage is null and
StageDateIntegratedStage is null and
TreatmentStartDateCancer is null and
ProcedureDate is null
);
Comment or raise an issue for this mapping.
CosdV8PersonStatedSexualOrientationCodeAtDiagnosis
-
Value copied from
PersonStatedSexualOrientationCodeAtDiagnosis -
PersonStatedSexualOrientationCodeAtDiagnosisPERSON STATED SEXUAL ORIENTATION CODE (AT DIAGNOSIS) is the PERSON STATED SEXUAL ORIENTATION CODE at the time of the PATIENT DIAGNOSIS. PERSON STATED SEXUAL ORIENTATION CODE (AT DIAGNOSIS)
with CO as (
select
Record ->> '$.Colorectal.ColorectalCore.ColorectalCoreDemographics.PersonStatedSexualOrientationCodeAtDiagnosis.@code' as PersonStatedSexualOrientationCodeAtDiagnosis,
Record ->> '$.Colorectal.ColorectalCore.ColorectalCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis' as ClinicalDateCancerDiagnosis,
Record ->> '$.Colorectal.ColorectalCore.ColorectalCoreTreatment.ColorectalCoreSurgeryAndOtherProcedures.ProcedureDate' as ProcedureDate,
Record ->> '$.Colorectal.ColorectalCore.ColorectalCoreTreatment.CancerTreatmentStartDate' as CancerTreatmentStartDate,
Record ->> '$.Colorectal.ColorectalCore.ColorectalCoreLinkagePatientId.NHSNumber.@extension' as NhsNumber
from omop_staging.cosd_staging_81
where Type = 'CO'
)
select
distinct
PersonStatedSexualOrientationCodeAtDiagnosis,
NhsNumber,
least(
cast (ClinicalDateCancerDiagnosis as date),
cast (ProcedureDate as date),
cast (CancerTreatmentStartDate as date)
) as Date
from CO o
where o.PersonStatedSexualOrientationCodeAtDiagnosis is not null
and not (
ClinicalDateCancerDiagnosis is null and
ProcedureDate is null and
CancerTreatmentStartDate is null
)
Comment or raise an issue for this mapping.
CosdV9BreastAsaScore
-
Value copied from
AsaScoreDescription -
AsaScoreDescriptionThe physical status of the PATIENT as recorded by an anaesthetist for the operative procedure. ASA PHYSICAL STATUS CLASSIFICATION SYSTEM CODE
with BR as (
select
Record ->> '$.PrimaryPathway.ReferralAndFirstStageOfPatientPathway.DateFirstSeen' as DateFirstSeen,
Record ->> '$.PrimaryPathway.ReferralAndFirstStageOfPatientPathway.DateFirstSeenCancerSpecialist' as DateFirstSeenCancerSpecialist,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed' as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.PrimaryPathway.Staging.StageDateFinalPretreatmentStage' as StageDateFinalPretreatmentStage,
Record ->> '$.PrimaryPathway.Staging.StageDateIntegratedStage' as StageDateIntegratedStage,
coalesce(
Record ->> '$.Treatment[0].TreatmentStartDateCancer',
Record ->> '$.Treatment.TreatmentStartDateCancer'
) as TreatmentStartDateCancer,
coalesce(
Record ->> '$.Treatment[0].Surgery.ProcedureDate',
Record ->> '$.Treatment.Surgery.ProcedureDate'
) as ProcedureDate,
coalesce(
Record ->> '$.Treatment[0].Surgery.AsaScore.@code',
Record ->> '$.Treatment.Surgery.AsaScore.@code'
) as AsaScore,
Record ->> '$.LinkagePatientId.NhsNumber.@extension' as NhsNumber
from omop_staging.cosd_staging_901
where type = 'BR'
)
select
distinct
AsaScore,
case AsaScore
when '1' then 'ASA 1 - A normal healthy patient.'
when '2' then 'ASA 2 - A patient with mild systemic disease.'
when '3' then 'ASA 3 - A patient with severe systemic disease.'
when '4' then 'ASA 4 - A patient with poorly controlled systemic disease.'
when '5' then 'ASA 5 - A patient with a moribund condition that is not expected to survive without the operation.'
when '6' then 'ASA 6 - A declared brain-dead patient whose organs are being removed for donor purposes'
else AsaScore
end as AsaScoreDescription,
NhsNumber,
least(
cast(DateFirstSeen as date),
cast(DateFirstSeenCancerSpecialist as date),
cast(DateOfPrimaryDiagnosisClinicallyAgreed as date),
cast(StageDateFinalPretreatmentStage as date),
cast(nullif(StageDateIntegratedStage, '') as date),
cast(TreatmentStartDateCancer as date),
cast(ProcedureDate as date)
) as Date
from BR o
where o.AsaScore is not null
and not (
DateFirstSeen is null and
DateFirstSeenCancerSpecialist is null and
DateOfPrimaryDiagnosisClinicallyAgreed is null and
StageDateFinalPretreatmentStage is null and
StageDateIntegratedStage is null and
TreatmentStartDateCancer is null and
ProcedureDate is null
);
Comment or raise an issue for this mapping.
COSD V8 Breast Person Stated Sexual Orientation Code At Diagnosis
-
Value copied from
PersonStatedSexualOrientationCodeAtDiagnosis -
PersonStatedSexualOrientationCodeAtDiagnosisPerson Stated Sexual Orientation Code At Diagnosis PersonStatedSexualOrientationCodeAtDiagnosis
with BR as (
select
Record ->> '$.Breast.BreastCore.BreastCoreDemographics.PersonStatedSexualOrientationCodeAtDiagnosis.@code' as PersonStatedSexualOrientationCodeAtDiagnosis,
Record ->> '$.Breast.BreastCore.BreastCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis' as ClinicalDateCancerDiagnosis,
coalesce(
Record ->> '$.Breast.BreastCore.BreastCoreTreatment[0].BreastCoreSurgery.ProcedureDate',
Record ->> '$.Breast.BreastCore.BreastCoreTreatment.BreastCoreSurgery.ProcedureDate'
) as ProcedureDate,
coalesce(
Record ->> '$.Breast.BreastCore.BreastCoreTreatment[0].CancerTreatmentStartDate',
Record ->> '$.Breast.BreastCore.BreastCoreTreatment.CancerTreatmentStartDate'
) as CancerTreatmentStartDate,
Record ->> '$.Breast.BreastCore.BreastCoreLinkagePatientId.NHSNumber.@extension' as NhsNumber
from omop_staging.cosd_staging_81
where Type = 'BR'
)
select
distinct
PersonStatedSexualOrientationCodeAtDiagnosis,
NhsNumber,
least(
cast (ClinicalDateCancerDiagnosis as date),
cast (ProcedureDate as date),
cast (CancerTreatmentStartDate as date)
) as Date
from BR o
where o.PersonStatedSexualOrientationCodeAtDiagnosis is not null
and not (
ClinicalDateCancerDiagnosis is null and
ProcedureDate is null and
CancerTreatmentStartDate is null
);
Comment or raise an issue for this mapping.
COSD V9 BA Observation Performance Status Adult
-
Value copied from
PerformanceStatusAdult -
PerformanceStatusAdultA World Health Organisation classification indicating a person’s status relating to activity or disability. PERFORMANCE STATUS (ADULT)
select distinct
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
Record ->> '$.PrimaryPathway.LinkageDiagnosticDetails.DateOfPrimaryDiagnosisClinicallyAgreed'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.PrimaryPathway.Diagnosis.PerformanceStatusAdult.@code'
as PerformanceStatusAdult
from omop_staging.cosd_staging_901
where type = 'BA'
and NhsNumber is not null
and PerformanceStatusAdult is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null
and PerformanceStatusAdult in ('0', '1', '2', '3', '4');
Comment or raise an issue for this mapping.
COSD V9 BA Observation Cancer Treatment Intent
-
Value copied from
CancerTreatmentIntent -
CancerTreatmentIntentThe intention of the cancer treatment provided during a Cancer Care Spell. CANCER TREATMENT INTENT
with ba as (
select
Record ->> '$.LinkagePatientId.NhsNumber.@extension'
as NhsNumber,
unnest([
[Record ->> '$.Treatment.CancerTreatmentIntent.@code'],
Record ->> '$.Treatment[*].CancerTreatmentIntent.@code'
], recursive := true) as CancerTreatmentIntent,
unnest([
[Record ->> '$.Treatment.TreatmentStartDateCancer'],
Record ->> '$.Treatment[*].TreatmentStartDateCancer'
], recursive := true) as TreatmentStartDateCancer
from omop_staging.cosd_staging_901
where type = 'BA'
)
select distinct
NhsNumber,
TreatmentStartDateCancer,
CancerTreatmentIntent
from ba
where NhsNumber is not null
and CancerTreatmentIntent is not null
and TreatmentStartDateCancer is not null;
Comment or raise an issue for this mapping.
COSD V8 BA Observation Performance Status Adult
-
Value copied from
PerformanceStatusAdult -
PerformanceStatusAdultA World Health Organisation classification indicating a person’s status relating to activity or disability. PERFORMANCE STATUS (ADULT)
select distinct
Record ->> '$.CNS.CNSCore.CNSCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
Record ->> '$.CNS.CNSCore.CNSCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis'
as DateOfPrimaryDiagnosisClinicallyAgreed,
Record ->> '$.CNS.CNSCore.CNSCoreDiagnosis.AdultPerformanceStatus.@code'
as PerformanceStatusAdult
from omop_staging.cosd_staging_81
where type = 'BA'
and NhsNumber is not null
and PerformanceStatusAdult is not null
and DateOfPrimaryDiagnosisClinicallyAgreed is not null
and PerformanceStatusAdult in ('0', '1', '2', '3', '4');
Comment or raise an issue for this mapping.
COSD V8 BA Observation Cancer Treatment Intent
-
Value copied from
CancerTreatmentIntent -
CancerTreatmentIntentThe intention of the cancer treatment provided during a Cancer Care Spell. CANCER TREATMENT INTENT
with ba as (
select
Record ->> '$.CNS.CNSCore.CNSCoreLinkagePatientId.NHSNumber.@extension'
as NhsNumber,
unnest([
[Record ->> '$.CNS.CNSCore.CNSCoreTreatment.CancerTreatmentIntent.@code'],
Record ->> '$.CNS.CNSCore.CNSCoreTreatment[*].CancerTreatmentIntent.@code'
], recursive := true) as CancerTreatmentIntent,
unnest([
[Record ->> '$.CNS.CNSCore.CNSCoreTreatment.CancerTreatmentStartDate'],
Record ->> '$.CNS.CNSCore.CNSCoreTreatment[*].CancerTreatmentStartDate'
], recursive := true) as TreatmentStartDateCancer
from omop_staging.cosd_staging_81
where type = 'BA'
)
select distinct
NhsNumber,
TreatmentStartDateCancer,
CancerTreatmentIntent
from ba
where NhsNumber is not null
and CancerTreatmentIntent is not null
and TreatmentStartDateCancer is not null;