gender_concept_id

SUS Outpatient Person

Source column PersonCurrentGenderCode. Lookup gender concept.

PersonCurrentGenderCode gender_concept_id notes
1 8507 Male
2 8532 Female
9 0 Indeterminate (unable to be classified as either male or female)
X 0 Not known

Notes

	select
		NHSNumber,
		max(DateofBirth) as DateOfBirth,
		max(EthnicCategory) as EthnicCategory,
		max(Sex) as PersonCurrentGenderCode
	from [omop_staging].[sus_OP]
	where NHSNumber is not null
	group by NHSNumber
	

Comment or raise an issue for this mapping.

SUS Inpatient Person

Source column PersonCurrentGenderCode. Lookup gender concept.

PersonCurrentGenderCode gender_concept_id notes
1 8507 Male
2 8532 Female
9 0 Indeterminate (unable to be classified as either male or female)
X 0 Not known

Notes

	select
		NHSNumber,
		max(DateofBirth) as DateOfBirth,
		max(EthnicGroup) as EthnicCategory,
		max(Sex) as PersonCurrentGenderCode
	from omop_staging.sus_APC
	where NHSNumber is not null
	group by NHSNumber
	

Comment or raise an issue for this mapping.

SUS A&E Person

Source column PersonCurrentGenderCode. Lookup gender concept.

PersonCurrentGenderCode gender_concept_id notes
1 8507 Male
2 8532 Female
9 0 Indeterminate (unable to be classified as either male or female)
X 0 Not known

Notes

	select
		NHSNumber,
		max(DateofBirth) as DateOfBirth,
		max(EthnicCategory) as EthnicCategory,
		max(Sex) as PersonCurrentGenderCode
	from omop_staging.sus_AE
	where NHSNumber is not null
	group by NHSNumber
	

Comment or raise an issue for this mapping.

SACT Person

Source column Person_Stated_Gender_Code. Lookup gender concept.

Person_Stated_Gender_Code gender_concept_id notes
1 8507 Male
2 8532 Female
9 0 Indeterminate (unable to be classified as either male or female)
X 0 Not known

Notes

	select
		NHS_Number,
		max (Date_Of_Birth) as Date_Of_Birth,
		max (Person_Stated_Gender_Code) as Person_Stated_Gender_Code
	from omop_staging.sact_staging
	group by NHS_Number
	

Comment or raise an issue for this mapping.

Rtds Demographics

Source column Sex. Lookup gender concept.

Sex gender_concept_id notes
Male 8507 Male
Female 8532 Female
Unknown 0 Indeterminate (unable to be classified as either male or female)
Not Stated 0 Unknown

Notes

select
	PatientId,
	max (DateOfBirth) as DateOfBirth,
	max (Sex) as Sex
from omop_staging.RTDS_1_Demographics d
where PatientId is not null
group by PatientId
	

Comment or raise an issue for this mapping.