What are the semantics of Person.getGender()?

Hi there, could someone help clarify the intended use of the gender field of the OpenMRS Person class?

Is it significant that this field is named “gender” rather than “sex”? Is it intended to represent a biological characteristic or a cultural characteristic?

Does the field use the values of HL7’s Administrative Sex (http://www.hl7.org/FHIR/v2/0001/index.html) or Administrative Gender (http://www.hl7.org/FHIR/2015May/administrative-gender-map-v3.html)? Or can it be an arbitrary string?


1 Like

Person.gender was created to specify whether the person is male, female, or other. Most implementations presumably use this as the biological characteristic; however, an implementation could set it based on a cultural characteristic as long as they are consistent in their usage.

There are probably examples of other uses, but the implementations I’ve seen are using M for male and F for female (biological characteristic), with possibly a handful of O for other & U for unknown. Our usage appears to closely align with FHIR’s Person.gender.

If you need to store genetically accurate information (strict biological characteristic) or reliably record the gender to which the person identifies (e.g., storing “F” for a trans woman) and plan to exchange data with other systems that may not follow the same semantic usage of this field, then you could use a person attribute to store information with a more strict definition.

Thanks! So, it sounds like there aren’t any validation constraints (though I expect we’ll stick to M, F, O, and U).

It looks like only the length of the gender string is validated (must be ≤50 chars). Using M, F, O, and U should certainly be safe.

1 Like