You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"* Any changes in a Diagnosis that may occur in later submissions, for the same Diagnosis date, is taken to be an additional diagnosis as opposed to a change (hence removal of the original)",
10
+
"* If the same Diagnosis occurs but we have 2 separate \"basis of diagnosis\" values, then the first one will be taken only")]
Record ->> '$.Lung.LungCore.LungCoreLinkagePatientId.NHSNumber.@extension' as NHSNumber,
6
+
Record ->> '$.Lung.LungCore.LungCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis' as DiagnosisDate,
7
+
Record ->> '$.Lung.LungCore.LungCoreLinkageDiagnosticDetails.DateOfNonPrimaryCancerDiagnosisClinicallyAgreed' as NonPrimaryDiagnosisDate,
8
+
Record ->> '$.Lung.LungCore.LungCoreDiagnosis.MorphologyICDODiagnosis.@code' as CancerHistology,
9
+
Record ->> '$.Lung.LungCore.LungCoreDiagnosis.TopographyICDO.@code' as CancerTopography,
10
+
Record ->> '$.Lung.LungCore.LungCoreLinkageDiagnosticDetails.PrimaryDiagnosis.@code'as CancerDiagnosis
11
+
from omop_staging.cosd_staging_81 lu
12
+
where lu.Type = 'LU'
13
+
)
14
+
15
+
select
16
+
distinct
17
+
NHSNumber,
18
+
coalesce(DiagnosisDate, NonPrimaryDiagnosisDate) as DiagnosisDate,
19
+
CancerHistology,
20
+
CancerTopography,
21
+
CancerDiagnosis
22
+
from lung
23
+
where NHSNumber is not null;
24
+
25
+
</Sql>
26
+
<Explanations>
27
+
<ExplanationcolumnName="NHSNumber">
28
+
<Description>Patient NHS Number</Description>
29
+
<Origin>NHS NUMBER</Origin>
30
+
</Explanation>
31
+
<ExplanationcolumnName="DiagnosisDate">
32
+
<Description>DATE OF PRIMARY CANCER DIAGNOSIS (CLINICALLY AGREED) is the date the Primary Cancer was confirmed or the Primary Cancer diagnosis was agreed.</Description>
33
+
<Origin>CLINICAL DATE CANCER DIAGNOSIS</Origin>
34
+
</Explanation>
35
+
<ExplanationcolumnName="CancerHistology">
36
+
<Description>MORPHOLOGY (ICD-O CANCER TRANSFORMATION) is the morphology code of the Cancer Transformation using the ICD-O CODE.</Description>
37
+
<Origin>MORPHOLOGY (ICD-O CANCER TRANSFORMATION)</Origin>
38
+
</Explanation>
39
+
<ExplanationcolumnName="CancerTopography">
40
+
<Description>TOPOGRAPHY (ICD-O) is the topographical site of the Tumour using the ICD-O CODE.</Description>
41
+
<Origin>TOPOGRAPHY (ICD-O)</Origin>
42
+
</Explanation>
43
+
<ExplanationcolumnName="CancerDiagnosis">
44
+
<Description>The primary diagnosis code for the cancer.</Description>
"* For a given Diagnosis date, all valid combinations of Histology and Topography are added (thereby giving us an ICD-O-3 condition) as well as the ICD10 Diagnosis.",
10
+
"* Any changes in a Diagnosis that may occur in later submissions, for the same Diagnosis date, is taken to be an additional diagnosis as opposed to a change (hence removal of the original)",
11
+
"* If the same Diagnosis occurs but we have 2 separate \"basis of diagnosis\" values, then the first one will be taken only")]
Record ->> '$.Lung.LungCore.LungCoreLinkagePatientId.NHSNumber.@extension' as NHSNumber,
6
+
Record ->> '$.Lung.LungCore.LungCoreLinkageDiagnosticDetails.ClinicalDateCancerDiagnosis' as DiagnosisDate,
7
+
Record ->> '$.Lung.LungCore.LungCoreLinkageDiagnosticDetails.DateOfNonPrimaryCancerDiagnosisClinicallyAgreed' as NonPrimaryDiagnosisDate,
8
+
Record ->> '$.Lung.LungCore.LungCoreDiagnosis.MorphologyICDODiagnosis.@code' as CancerHistology,
9
+
Record ->> '$.Lung.LungCore.LungCoreDiagnosis.TopographyICDO.@code' as CancerTopography,
10
+
Record ->> '$.Lung.LungCore.LungCoreLinkageDiagnosticDetails.PrimaryDiagnosis.@code'as CancerDiagnosis
11
+
from omop_staging.cosd_staging_81 lu
12
+
where lu.Type = 'LU'
13
+
)
14
+
15
+
select
16
+
distinct
17
+
NHSNumber,
18
+
coalesce(DiagnosisDate, NonPrimaryDiagnosisDate) as DiagnosisDate,
19
+
CancerHistology,
20
+
CancerTopography,
21
+
CancerDiagnosis
22
+
from lung
23
+
where NHSNumber is not null
24
+
and CancerHistology is not null
25
+
and CancerTopography is not null;
26
+
27
+
</Sql>
28
+
<Explanations>
29
+
<ExplanationcolumnName="NHSNumber">
30
+
<Description>Patient NHS Number</Description>
31
+
<Origin>NHS NUMBER</Origin>
32
+
</Explanation>
33
+
<ExplanationcolumnName="DiagnosisDate">
34
+
<Description>DATE OF PRIMARY CANCER DIAGNOSIS (CLINICALLY AGREED) is the date the Primary Cancer was confirmed or the Primary Cancer diagnosis was agreed.</Description>
35
+
<Origin>CLINICAL DATE CANCER DIAGNOSIS</Origin>
36
+
</Explanation>
37
+
<ExplanationcolumnName="CancerHistology">
38
+
<Description>MORPHOLOGY (ICD-O CANCER TRANSFORMATION) is the morphology code of the Cancer Transformation using the ICD-O CODE.</Description>
39
+
<Origin>MORPHOLOGY (ICD-O CANCER TRANSFORMATION)</Origin>
40
+
</Explanation>
41
+
<ExplanationcolumnName="CancerTopography">
42
+
<Description>TOPOGRAPHY (ICD-O) is the topographical site of the Tumour using the ICD-O CODE.</Description>
43
+
<Origin>TOPOGRAPHY (ICD-O)</Origin>
44
+
</Explanation>
45
+
<ExplanationcolumnName="CancerDiagnosis">
46
+
<Description>The primary diagnosis code for the cancer.</Description>
"* Any changes in a Diagnosis that may occur in later submissions, for the same Diagnosis date, is taken to be an additional diagnosis as opposed to a change (hence removal of the original)",
10
+
"* If the same Diagnosis occurs but we have 2 separate \"basis of diagnosis\" values, then the first one will be taken only")]
0 commit comments