HospitalProviderSpellNumber
Sus CCMDS High Cost Drugs
-
Value copied from
HospitalProviderSpellNumber
-
HospitalProviderSpellNumber
CDS specific hospital spell number that binds many episodes together. HOSPITAL PROVIDER SPELL NUMBER
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 Inpatient Total Previous Pregnancies Observation
-
Value copied from
HospitalProviderSpellNumber
-
HospitalProviderSpellNumber
CDS specific hospital spell number that binds many episodes together. HOSPITAL PROVIDER SPELL NUMBER
select
apc.NHSNumber,
apc.GeneratedRecordIdentifier,
apc.HospitalProviderSpellNumber,
max(apc.CDSActivityDate) as observation_date,
apc.PregnancyTotalPreviousPregnancies
from [omop_staging].[sus_APC] apc
where apc.NHSNumber is not null
and apc.PregnancyTotalPreviousPregnancies is not null
and apc.CDSActivityDate is not null
and apc.CdsType in ('140', '120')
group by
apc.NHSNumber,
apc.GeneratedRecordIdentifier,
apc.HospitalProviderSpellNumber,
apc.PregnancyTotalPreviousPregnancies;
Comment or raise an issue for this mapping.
SUS Inpatient NumberofBabies Observation
-
Value copied from
HospitalProviderSpellNumber
-
HospitalProviderSpellNumber
CDS specific hospital spell number that binds many episodes together. HOSPITAL PROVIDER SPELL NUMBER
select
apc.NHSNumber,
apc.GeneratedRecordIdentifier,
apc.HospitalProviderSpellNumber,
coalesce(max(apc.DeliveryDate), max(apc.CDSActivityDate)) as observation_date,
apc.NumberofBabies
from [omop_staging].[sus_APC] apc
where apc.NHSNumber is not null
and apc.NumberofBabies is not null
and apc.CDSType in ('120','140')
group by
apc.NHSNumber,
apc.GeneratedRecordIdentifier,
apc.HospitalProviderSpellNumber,
apc.DeliveryDate,
apc.NumberofBabies;
Comment or raise an issue for this mapping.
SUS Inpatient Gestation Length Labour Onset Observation
-
Value copied from
HospitalProviderSpellNumber
-
HospitalProviderSpellNumber
CDS specific hospital spell number that binds many episodes together. HOSPITAL PROVIDER SPELL NUMBER
select
apc.NHSNumber,
apc.GeneratedRecordIdentifier,
apc.HospitalProviderSpellNumber,
coalesce(max(apc.DeliveryDate), max(apc.CDSActivityDate)) as observation_date,
apc.GestationLengthLabourOnset
from [omop_staging].[sus_APC] as apc
where apc.NHSNumber is not null
and apc.GestationLengthLabourOnset is not null
and apc.CDSType in ('120', '140')
group by
apc.NHSNumber,
apc.GeneratedRecordIdentifier,
apc.HospitalProviderSpellNumber,
apc.DeliveryDate,
apc.GestationLengthLabourOnset;
Comment or raise an issue for this mapping.
SUS Inpatient Carer Support Indicator Observation
-
Value copied from
HospitalProviderSpellNumber
-
HospitalProviderSpellNumber
CDS specific hospital spell number that binds many episodes together. HOSPITAL PROVIDER SPELL NUMBER
select
apc.NHSNumber,
max(apc.CDSActivityDate) as CDSActivityDate,
apc.CarerSupportIndicator,
apc.HospitalProviderSpellNumber,
apc.GeneratedRecordIdentifier
from omop_staging.sus_APC apc
where apc.CarerSupportIndicator is not null
and apc.NHSNumber is not null
group by
apc.NHSNumber,
apc.CarerSupportIndicator,
apc.HospitalProviderSpellNumber,
apc.GeneratedRecordIdentifier;
Comment or raise an issue for this mapping.
Sus APC Birth Weight Observation
-
Value copied from
HospitalProviderSpellNumber
-
HospitalProviderSpellNumber
CDS specific hospital spell number that binds many episodes together. HOSPITAL PROVIDER SPELL NUMBER
select
apc.NHSNumber,
apc.GeneratedRecordIdentifier,
apc.HospitalProviderSpellNumber,
coalesce(max(apc.DeliveryDate), max(apc.CDSActivityDate)) as observation_date,
b.BirthWeightBaby as BirthWeight
from [omop_staging].[sus_APC] apc
inner join [omop_staging].[sus_Birth] as b
on apc.MessageId = b.MessageId
where b.BirthWeightBaby is not null
and apc.NHSNumber is not null
and apc.CdsType in ('140', '120')
group by
apc.NHSNumber,
apc.GeneratedRecordIdentifier,
apc.HospitalProviderSpellNumber,
apc.DeliveryDate,
b.BirthWeightBaby;
Comment or raise an issue for this mapping.
SUS APC Anaesthetic Given Post Labour Delivery Observation
-
Value copied from
HospitalProviderSpellNumber
-
HospitalProviderSpellNumber
CDS specific hospital spell number that binds many episodes together. HOSPITAL PROVIDER SPELL NUMBER
select
apc.NHSNumber,
apc.GeneratedRecordIdentifier,
apc.HospitalProviderSpellNumber,
coalesce(max(apc.DeliveryDate), max(apc.CDSActivityDate)) as observation_date,
apc.AnaestheticGivenPostDelivery
from omop_staging.sus_APC as apc
where apc.AnaestheticGivenPostDelivery is not null
and apc.NHSNumber is not null
and apc.CdsType in ('140', '120')
group by
apc.NHSNumber,
apc.GeneratedRecordIdentifier,
apc.HospitalProviderSpellNumber,
apc.DeliveryDate,
apc.AnaestheticGivenPostDelivery;
Comment or raise an issue for this mapping.
SUS APC Anaesthetic During Labour Delivery Observation
-
Value copied from
HospitalProviderSpellNumber
-
HospitalProviderSpellNumber
CDS specific hospital spell number that binds many episodes together. HOSPITAL PROVIDER SPELL NUMBER
select
apc.NHSNumber,
apc.GeneratedRecordIdentifier,
coalesce(max(apc.DeliveryDate), max(apc.CDSActivityDate)) as observation_date,
apc.HospitalProviderSpellNumber,
apc.AnaestheticGivenDuringLabourDelivery
from omop_staging.sus_APC as apc
where apc.AnaestheticGivenDuringLabourDelivery is not null
and apc.NHSNumber is not null
and apc.CdsType in ('140', '120')
group by
apc.NHSNumber,
apc.GeneratedRecordIdentifier,
apc.HospitalProviderSpellNumber,
apc.DeliveryDate,
apc.AnaestheticGivenDuringLabourDelivery;