(0010,0040)
Patient's Sex
Keyword: PatientSex
Sex of the named patient. Enumerated Values: M (male), F (female) and O (other).
Tag Attributes
- Tag ID
- (0010,0040)
- Compact
- 00100040
- Keyword
- PatientSex
- VR
- CS — Code String
- VM
- 1
- Required
- Type 2 — required, may be empty
- PS3.15
- Basic Profile action Z
- Retired
- No
Defined in
What Patient's Sex contains
Type 2: it may be empty when unknown. It usually comes from the order through the Modality Worklist rather than being typed at the device.
Group 0010 holds information about the patient.
Value format: CS (Code String), VM 1
(0010,0040) PatientSex has Value Representation CS (Code String) and Value Multiplicity 1, which means exactly one value.
CS — Code String
A short code. Leading and trailing spaces are not significant. Codes are usually Defined Terms or Enumerated Values listed by the standard.
- Length
- 16 bytes maximum
- Characters
- Uppercase letters A–Z, digits 0–9, the space and the underscore.
Example value
F
Format mistakes to avoid
- Lowercase letters, hyphens and other punctuation are not allowed, so ct or Head-Neck are invalid code strings.
- Values longer than 16 characters are invalid.
Common values
| Value | Meaning |
|---|---|
| M | Male |
| F | Female |
| O | Other |
Where PatientSex appears
| Defined in | Type | Meaning |
|---|---|---|
| Patient ModulePS3.3 C.7.1.1 | 2 | Required, but it may be empty (zero length) when the value is unknown. |
A module lists the attributes an object must or may carry. Many IODs (CT Image, MR Image, Secondary Capture and others) include the same module, and an IOD-specific module can make an attribute stricter than the general one.
In a C-FIND query using the Study Root Query/Retrieve Information Model, it is a STUDY-level key of type O: an Optional Key: an SCP may or may not support matching on it, so check its conformance statement.
In the Patient Root model it is a PATIENT-level key of type O: an Optional Key: an SCP may or may not support matching on it, so check its conformance statement.
In a Modality Worklist query it is a matching key of type O (matching on it is optional for the worklist SCP) and a return key of type 2 (the SCP must return it, possibly empty).
De-identification (PS3.15)
PS3.15 Table E.1-1 gives Patient's Sex the Basic Profile action Z: replace it with an empty value, or with a dummy value consistent with the VR.
With the Retain Patient Characteristics Option, the action is K: keep it unchanged (a sequence is kept but cleaned item by item).
To see how de-identification changes your own files, try the free DICOM Anonymizer, which runs in the browser and uploads nothing.
In archives and migrations
Patient attributes are the values most often changed after acquisition: corrections from the RIS or a master patient index, merges, and attribute coercion on receipt, which an archive lists in its DICOM conformance statement. Before a migration, decide which archive holds the correct demographics, because the same study with different patient values in two places looks like two patients.
Common errors and how to fix them
Troubleshooting: Values other than M, F or O, such as Female, U or a lowercase f, are invalid. Map them in the interface that feeds the worklist rather than editing images afterwards.
Check a file in seconds with the free DICOM Validator: it reads the header in your browser, lists the tags with their values, and flags missing or malformed key attributes.
Patient's Sex: frequently asked questions
What is DICOM tag (0010,0040) Patient's Sex?
Sex of the named patient. Enumerated Values: M (male), F (female) and O (other).
What VR and VM does Patient's Sex (0010,0040) have?
(0010,0040) PatientSex has Value Representation CS (Code String) and Value Multiplicity 1, which means exactly one value. A short code. Leading and trailing spaces are not significant. Codes are usually Defined Terms or Enumerated Values listed by the standard. Maximum length: 16 bytes maximum.
Is Patient's Sex (0010,0040) required?
In the Patient Module (PS3.3 C.7.1.1) it is Type 2: required, but it may be empty (zero length) when the value is unknown.
Can you query a PACS by Patient's Sex?
In a C-FIND query using the Study Root Query/Retrieve Information Model, it is a STUDY-level key of type O: an Optional Key: an SCP may or may not support matching on it, so check its conformance statement. In the Patient Root model it is a PATIENT-level key of type O: an Optional Key: an SCP may or may not support matching on it, so check its conformance statement. In a Modality Worklist query it is a matching key of type O (matching on it is optional for the worklist SCP) and a return key of type 2 (the SCP must return it, possibly empty).
How is Patient's Sex handled when de-identifying DICOM files?
PS3.15 Table E.1-1 gives Patient's Sex the Basic Profile action Z: replace it with an empty value, or with a dummy value consistent with the VR. With the Retain Patient Characteristics Option, the action is K: keep it unchanged (a sequence is kept but cleaned item by item).
How do I troubleshoot Patient's Sex (0010,0040)?
Values other than M, F or O, such as Female, U or a lowercase f, are invalid. Map them in the interface that feeds the worklist rather than editing images afterwards.
Check PatientSex in your files
The free DICOM Validator lists every header tag and flags problems. Files stay in your browser.
Open DICOM Validator →Remove patient data before sharing
The free DICOM Anonymizer applies a de-identification profile in your browser, with no upload.
Open DICOM Anonymizer →Sources
Checked against the DICOM standard, release 2026d. Module Types, query keys and de-identification actions come from these tables: