Release 5 Ballot

This page is part of the FHIR Specification (v5.0.0-ballot: FHIR R5 Ballot Preview). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

4.4.1.201 ValueSet http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype

Patient Administration Work Group Maturity Level: 0Informative Use Context: Any

This is a value set defined by the FHIR project.

Summary

Defining URL:http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype
Version:5.0.0-ballot
Name:PatientRelationshipType
Title:
Status:draft
Definition:

A set of codes that can be used to indicate the relationship between a Patient and a Related Person.

Committee:Patient Administration Work Group
OID:2.16.840.1.113883.4.642.3.449 (for OID based terminology systems)
Flags:

This value set is used in the following places:


This value set includes codes based on the following rules:

 

This expansion generated 07 Sep 2022


This value set contains 123 concepts

CodeSystemDisplayDefinition
  BP http://terminology.hl7.org/CodeSystem/v2-0131Billing contact person

Billing contact person

  CP http://terminology.hl7.org/CodeSystem/v2-0131Contact person

Contact person

  EP http://terminology.hl7.org/CodeSystem/v2-0131Emergency contact person

Emergency contact person

  PR http://terminology.hl7.org/CodeSystem/v2-0131Person preparing referral

Person preparing referral

  E http://terminology.hl7.org/CodeSystem/v2-0131Employer

Employer

  C http://terminology.hl7.org/CodeSystem/v2-0131Emergency Contact

Emergency Contact

  F http://terminology.hl7.org/CodeSystem/v2-0131Federal Agency

Federal Agency

  I http://terminology.hl7.org/CodeSystem/v2-0131Insurance Company

Insurance Company

  N http://terminology.hl7.org/CodeSystem/v2-0131Next-of-Kin

Next-of-Kin

  S http://terminology.hl7.org/CodeSystem/v2-0131State Agency

State Agency

  O http://terminology.hl7.org/CodeSystem/v2-0131Other

Other

  U http://terminology.hl7.org/CodeSystem/v2-0131Unknown

Unknown

  _PersonalRelationshipRoleType http://terminology.hl7.org/CodeSystem/v3-RoleCodePersonalRelationshipRoleType
  FAMMEMB http://terminology.hl7.org/CodeSystem/v3-RoleCodefamily member

A relationship between two people characterizing their "familial" relationship

  CHILD http://terminology.hl7.org/CodeSystem/v3-RoleCodechild

The player of the role is a child of the scoping entity.

  CHLDADOPT http://terminology.hl7.org/CodeSystem/v3-RoleCodeadopted child

The player of the role is a child taken into a family through legal means and raised by the scoping person (parent) as his or her own child.

  DAUADOPT http://terminology.hl7.org/CodeSystem/v3-RoleCodeadopted daughter

The player of the role is a female child taken into a family through legal means and raised by the scoping person (parent) as his or her own child.

  SONADOPT http://terminology.hl7.org/CodeSystem/v3-RoleCodeadopted son

The player of the role is a male child taken into a family through legal means and raised by the scoping person (parent) as his or her own child.

  CHLDFOST http://terminology.hl7.org/CodeSystem/v3-RoleCodefoster child

The player of the role is a child receiving parental care and nurture from the scoping person (parent) but not related to him or her through legal or blood ties.

  DAUFOST http://terminology.hl7.org/CodeSystem/v3-RoleCodefoster daughter

The player of the role is a female child receiving parental care and nurture from the scoping person (parent) but not related to him or her through legal or blood ties.

  SONFOST http://terminology.hl7.org/CodeSystem/v3-RoleCodefoster son

The player of the role is a male child receiving parental care and nurture from the scoping person (parent) but not related to him or her through legal or blood ties.

  DAUC http://terminology.hl7.org/CodeSystem/v3-RoleCodedaughter

Description: The player of the role is a female child (of any type) of scoping entity (parent)

  DAU http://terminology.hl7.org/CodeSystem/v3-RoleCodenatural daughter

The player of the role is a female offspring of the scoping entity (parent).

  STPDAU http://terminology.hl7.org/CodeSystem/v3-RoleCodestepdaughter

The player of the role is a daughter of the scoping person's spouse by a previous union.

  NCHILD http://terminology.hl7.org/CodeSystem/v3-RoleCodenatural child

The player of the role is an offspring of the scoping entity as determined by birth.

  SON http://terminology.hl7.org/CodeSystem/v3-RoleCodenatural son

The player of the role is a male offspring of the scoping entity (parent).

  SONC http://terminology.hl7.org/CodeSystem/v3-RoleCodeson

Description: The player of the role is a male child (of any type) of scoping entity (parent)

  STPSON http://terminology.hl7.org/CodeSystem/v3-RoleCodestepson

The player of the role is a son of the scoping person's spouse by a previous union.

  STPCHLD http://terminology.hl7.org/CodeSystem/v3-RoleCodestep child

The player of the role is a child of the scoping person's spouse by a previous union.

  EXT http://terminology.hl7.org/CodeSystem/v3-RoleCodeextended family member

Description: A family member not having an immediate genetic or legal relationship e.g. Aunt, cousin, great grandparent, grandchild, grandparent, niece, nephew or uncle.

  AUNT http://terminology.hl7.org/CodeSystem/v3-RoleCodeaunt

The player of the role is a sister of the scoping person's mother or father.

  MAUNT http://terminology.hl7.org/CodeSystem/v3-RoleCodematernal aunt

**Description:**The player of the role is a biological sister of the scoping person's biological mother.

  PAUNT http://terminology.hl7.org/CodeSystem/v3-RoleCodepaternal aunt

**Description:**The player of the role is a biological sister of the scoping person's biological father.

  COUSN http://terminology.hl7.org/CodeSystem/v3-RoleCodecousin

The player of the role is a relative of the scoping person descended from a common ancestor, such as a grandparent, by two or more steps in a diverging line.

  MCOUSN http://terminology.hl7.org/CodeSystem/v3-RoleCodematernal cousin

**Description:**The player of the role is a biological relative of the scoping person descended from a common ancestor on the player's mother's side, such as a grandparent, by two or more steps in a diverging line.

  PCOUSN http://terminology.hl7.org/CodeSystem/v3-RoleCodepaternal cousin

**Description:**The player of the role is a biological relative of the scoping person descended from a common ancestor on the player's father's side, such as a grandparent, by two or more steps in a diverging line.

  GGRPRN http://terminology.hl7.org/CodeSystem/v3-RoleCodegreat grandparent

The player of the role is a parent of the scoping person's grandparent.

  GGRFTH http://terminology.hl7.org/CodeSystem/v3-RoleCodegreat grandfather

The player of the role is the father of the scoping person's grandparent.

  MGGRFTH http://terminology.hl7.org/CodeSystem/v3-RoleCodematernal great-grandfather

**Description:**The player of the role is the biological father of the scoping person's biological mother's parent.

  PGGRFTH http://terminology.hl7.org/CodeSystem/v3-RoleCodepaternal great-grandfather

**Description:**The player of the role is the biological father of the scoping person's biological father's parent.

  GGRMTH http://terminology.hl7.org/CodeSystem/v3-RoleCodegreat grandmother

The player of the role is the mother of the scoping person's grandparent.

  MGGRMTH http://terminology.hl7.org/CodeSystem/v3-RoleCodematernal great-grandmother

**Description:**The player of the role is the biological mother of the scoping person's biological mother's parent.

  PGGRMTH http://terminology.hl7.org/CodeSystem/v3-RoleCodepaternal great-grandmother

**Description:**The player of the role is the biological mother of the scoping person's biological father's parent.

  MGGRPRN http://terminology.hl7.org/CodeSystem/v3-RoleCodematernal great-grandparent

**Description:**The player of the role is a biological parent of the scoping person's biological mother's parent.

  PGGRPRN http://terminology.hl7.org/CodeSystem/v3-RoleCodepaternal great-grandparent

**Description:**The player of the role is a biological parent of the scoping person's biological father's parent.

  GRNDCHILD http://terminology.hl7.org/CodeSystem/v3-RoleCodegrandchild

The player of the role is a child of the scoping person's son or daughter.

  GRNDDAU http://terminology.hl7.org/CodeSystem/v3-RoleCodegranddaughter

The player of the role is a daughter of the scoping person's son or daughter.

  GRNDSON http://terminology.hl7.org/CodeSystem/v3-RoleCodegrandson

The player of the role is a son of the scoping person's son or daughter.

  GRPRN http://terminology.hl7.org/CodeSystem/v3-RoleCodegrandparent

The player of the role is a parent of the scoping person's mother or father.

  GRFTH http://terminology.hl7.org/CodeSystem/v3-RoleCodegrandfather

The player of the role is the father of the scoping person's mother or father.

  MGRFTH http://terminology.hl7.org/CodeSystem/v3-RoleCodematernal grandfather

**Description:**The player of the role is the biological father of the scoping person's biological mother.

  PGRFTH http://terminology.hl7.org/CodeSystem/v3-RoleCodepaternal grandfather

**Description:**The player of the role is the biological father of the scoping person's biological father.

  GRMTH http://terminology.hl7.org/CodeSystem/v3-RoleCodegrandmother

The player of the role is the mother of the scoping person's mother or father.

  MGRMTH http://terminology.hl7.org/CodeSystem/v3-RoleCodematernal grandmother

**Description:**The player of the role is the biological mother of the scoping person's biological mother.

  PGRMTH http://terminology.hl7.org/CodeSystem/v3-RoleCodepaternal grandmother

**Description:**The player of the role is the biological mother of the scoping person's biological father.

  MGRPRN http://terminology.hl7.org/CodeSystem/v3-RoleCodematernal grandparent

**Description:**The player of the role is the biological parent of the scoping person's biological mother.

  PGRPRN http://terminology.hl7.org/CodeSystem/v3-RoleCodepaternal grandparent

**Description:**The player of the role is the biological parent of the scoping person's biological father.

  INLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodeinlaw

A relationship between an individual and a member of their spousal partner's immediate family.

  CHLDINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodechild-in-law

The player of the role is the spouse of scoping person's child.

  DAUINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodedaughter in-law

The player of the role is the wife of scoping person's son.

  SONINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodeson in-law

The player of the role is the husband of scoping person's daughter.

  PRNINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodeparent in-law

The player of the role is the parent of scoping person's husband or wife.

  FTHINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodefather-in-law

The player of the role is the father of the scoping person's husband or wife.

  MTHINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodemother-in-law

The player of the role is the mother of the scoping person's husband or wife.

  MTHINLOAW http://terminology.hl7.org/CodeSystem/v3-RoleCodemother-in-law

The player of the role is the mother of the scoping person's husband or wife.

  SIBINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodesibling in-law

The player of the role is: (1) a sibling of the scoping person's spouse, or (2) the spouse of the scoping person's sibling, or (3) the spouse of a sibling of the scoping person's spouse.

  BROINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodebrother-in-law

The player of the role is: (1) a brother of the scoping person's spouse, or (2) the husband of the scoping person's sister, or (3) the husband of a sister of the scoping person's spouse.

  SISINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodesister-in-law

The player of the role is: (1) a sister of the scoping person's spouse, or (2) the wife of the scoping person's brother, or (3) the wife of a brother of the scoping person's spouse.

  SISLINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodesister-in-law

The player of the role is: (1) a sister of the scoping person's spouse, or (2) the wife of the scoping person's brother, or (3) the wife of a brother of the scoping person's spouse.

  NIENEPH http://terminology.hl7.org/CodeSystem/v3-RoleCodeniece/nephew

The player of the role is a child of scoping person's brother or sister or of the brother or sister of the scoping person's spouse.

  NEPHEW http://terminology.hl7.org/CodeSystem/v3-RoleCodenephew

The player of the role is a son of the scoping person's brother or sister or of the brother or sister of the scoping person's spouse.

  NIECE http://terminology.hl7.org/CodeSystem/v3-RoleCodeniece

The player of the role is a daughter of the scoping person's brother or sister or of the brother or sister of the scoping person's spouse.

  UNCLE http://terminology.hl7.org/CodeSystem/v3-RoleCodeuncle

The player of the role is a brother of the scoping person's mother or father.

  MUNCLE http://terminology.hl7.org/CodeSystem/v3-RoleCodematernal uncle

**Description:**The player of the role is a biological brother of the scoping person's biological mother.

  PUNCLE http://terminology.hl7.org/CodeSystem/v3-RoleCodepaternal uncle

**Description:**The player of the role is a biological brother of the scoping person's biological father.

  PRN http://terminology.hl7.org/CodeSystem/v3-RoleCodeparent

The player of the role is one who begets, gives birth to, or nurtures and raises the scoping entity (child).

  ADOPTP http://terminology.hl7.org/CodeSystem/v3-RoleCodeadoptive parent

The player of the role (parent) has taken the scoper (child) into their family through legal means and raises them as his or her own child.

  ADOPTF http://terminology.hl7.org/CodeSystem/v3-RoleCodeadoptive father

The player of the role (father) is a male who has taken the scoper (child) into their family through legal means and raises them as his own child.

  ADOPTM http://terminology.hl7.org/CodeSystem/v3-RoleCodeadoptive mother

The player of the role (father) is a female who has taken the scoper (child) into their family through legal means and raises them as her own child.

  FTH http://terminology.hl7.org/CodeSystem/v3-RoleCodefather

The player of the role is a male who begets or raises or nurtures the scoping entity (child).

  FTHFOST http://terminology.hl7.org/CodeSystem/v3-RoleCodefoster father

The player of the role (parent) who is a male state-certified caregiver responsible for the scoper (child) who has been placed in the parent's care. The placement of the child is usually arranged through the government or a social-service agency, and temporary.

The state, via a jurisdiction recognized child protection agency, stands as in loco parentis to the child, making all legal decisions while the foster parent is responsible for the day-to-day care of the specified child.

  NFTH http://terminology.hl7.org/CodeSystem/v3-RoleCodenatural father

The player of the role is a male who begets the scoping entity (child).

  NFTHF http://terminology.hl7.org/CodeSystem/v3-RoleCodenatural father of fetus

Indicates the biologic male parent of a fetus.

  STPFTH http://terminology.hl7.org/CodeSystem/v3-RoleCodestepfather

The player of the role is the husband of scoping person's mother and not the scoping person's natural father.

  MTH http://terminology.hl7.org/CodeSystem/v3-RoleCodemother

The player of the role is a female who conceives, gives birth to, or raises and nurtures the scoping entity (child).

  GESTM http://terminology.hl7.org/CodeSystem/v3-RoleCodegestational mother

The player is a female whose womb carries the fetus of the scoper. Generally used when the gestational mother and natural mother are not the same.

  MTHFOST http://terminology.hl7.org/CodeSystem/v3-RoleCodefoster mother

The player of the role (parent) who is a female state-certified caregiver responsible for the scoper (child) who has been placed in the parent's care. The placement of the child is usually arranged through the government or a social-service agency, and temporary.

The state, via a jurisdiction recognized child protection agency, stands as in loco parentis to the child, making all legal decisions while the foster parent is responsible for the day-to-day care of the specified child.

  NMTH http://terminology.hl7.org/CodeSystem/v3-RoleCodenatural mother

The player of the role is a female who conceives or gives birth to the scoping entity (child).

  NMTHF http://terminology.hl7.org/CodeSystem/v3-RoleCodenatural mother of fetus

The player is the biologic female parent of the scoping fetus.

  STPMTH http://terminology.hl7.org/CodeSystem/v3-RoleCodestepmother

The player of the role is the wife of scoping person's father and not the scoping person's natural mother.

  NPRN http://terminology.hl7.org/CodeSystem/v3-RoleCodenatural parent
  PRNFOST http://terminology.hl7.org/CodeSystem/v3-RoleCodefoster parent

The player of the role (parent) who is a state-certified caregiver responsible for the scoper (child) who has been placed in the parent's care. The placement of the child is usually arranged through the government or a social-service agency, and temporary.

The state, via a jurisdiction recognized child protection agency, stands as in loco parentis to the child, making all legal decisions while the foster parent is responsible for the day-to-day care of the specified child.

  STPPRN http://terminology.hl7.org/CodeSystem/v3-RoleCodestep parent

The player of the role is the spouse of the scoping person's parent and not the scoping person's natural parent.

  SIB http://terminology.hl7.org/CodeSystem/v3-RoleCodesibling

The player of the role shares one or both parents in common with the scoping entity.

  BRO http://terminology.hl7.org/CodeSystem/v3-RoleCodebrother

The player of the role is a male sharing one or both parents in common with the scoping entity.

  HBRO http://terminology.hl7.org/CodeSystem/v3-RoleCodehalf-brother

The player of the role is a male related to the scoping entity by sharing only one biological parent.

  NBRO http://terminology.hl7.org/CodeSystem/v3-RoleCodenatural brother

The player of the role is a male having the same biological parents as the scoping entity.

  TWINBRO http://terminology.hl7.org/CodeSystem/v3-RoleCodetwin brother

The scoper was carried in the same womb as the male player and shares common biological parents.

  FTWINBRO http://terminology.hl7.org/CodeSystem/v3-RoleCodefraternal twin brother

The scoper was carried in the same womb as the male player and shares common biological parents but is the product of a distinct egg/sperm pair.

  ITWINBRO http://terminology.hl7.org/CodeSystem/v3-RoleCodeidentical twin brother

The male scoper is an offspring of the same egg-sperm pair as the male player.

  STPBRO http://terminology.hl7.org/CodeSystem/v3-RoleCodestepbrother

The player of the role is a son of the scoping person's stepparent.

  HSIB http://terminology.hl7.org/CodeSystem/v3-RoleCodehalf-sibling

The player of the role is related to the scoping entity by sharing only one biological parent.

  HSIS http://terminology.hl7.org/CodeSystem/v3-RoleCodehalf-sister

The player of the role is a female related to the scoping entity by sharing only one biological parent.

  NSIB http://terminology.hl7.org/CodeSystem/v3-RoleCodenatural sibling

The player of the role has both biological parents in common with the scoping entity.

  NSIS http://terminology.hl7.org/CodeSystem/v3-RoleCodenatural sister

The player of the role is a female having the same biological parents as the scoping entity.

  TWINSIS http://terminology.hl7.org/CodeSystem/v3-RoleCodetwin sister

The scoper was carried in the same womb as the female player and shares common biological parents.

  FTWINSIS http://terminology.hl7.org/CodeSystem/v3-RoleCodefraternal twin sister

The scoper was carried in the same womb as the female player and shares common biological parents but is the product of a distinct egg/sperm pair.

  ITWINSIS http://terminology.hl7.org/CodeSystem/v3-RoleCodeidentical twin sister

The female scoper is an offspring of the same egg-sperm pair as the female player.

  TWIN http://terminology.hl7.org/CodeSystem/v3-RoleCodetwin

The scoper and player were carried in the same womb and shared common biological parents.

  FTWIN http://terminology.hl7.org/CodeSystem/v3-RoleCodefraternal twin

The scoper and player were carried in the same womb and share common biological parents but are the product of distinct egg/sperm pairs.

  ITWIN http://terminology.hl7.org/CodeSystem/v3-RoleCodeidentical twin

The scoper and player are offspring of the same egg-sperm pair.

  SIS http://terminology.hl7.org/CodeSystem/v3-RoleCodesister

The player of the role is a female sharing one or both parents in common with the scoping entity.

  STPSIS http://terminology.hl7.org/CodeSystem/v3-RoleCodestepsister

The player of the role is a daughter of the scoping person's stepparent.

  STPSIB http://terminology.hl7.org/CodeSystem/v3-RoleCodestep sibling

The player of the role is a child of the scoping person's stepparent.

  SIGOTHR http://terminology.hl7.org/CodeSystem/v3-RoleCodesignificant other

A person who is important to one's well being; especially a spouse or one in a similar relationship. (The player is the one who is important)

  DOMPART http://terminology.hl7.org/CodeSystem/v3-RoleCodedomestic partner

The player of the role cohabits with the scoping person but is not the scoping person's spouse.

  FMRSPS http://terminology.hl7.org/CodeSystem/v3-RoleCodeformer spouse

Player of the role was previously joined to the scoping person in marriage and this marriage is now dissolved and inactive.

Usage Note: This is significant to indicate as some jurisdictions have different legal requirements for former spouse to access the patient's record, from a general friend.

  SPS http://terminology.hl7.org/CodeSystem/v3-RoleCodespouse

The player of the role is a marriage partner of the scoping person.

  HUSB http://terminology.hl7.org/CodeSystem/v3-RoleCodehusband

The player of the role is a man joined to a woman (scoping person) in marriage.

  WIFE http://terminology.hl7.org/CodeSystem/v3-RoleCodewife

The player of the role is a woman joined to a man (scoping person) in marriage.

  FRND http://terminology.hl7.org/CodeSystem/v3-RoleCodeunrelated friend

The player of the role is a person who is known, liked, and trusted by the scoping person.

  NBOR http://terminology.hl7.org/CodeSystem/v3-RoleCodeneighbor

The player of the role lives near or next to the scoping person.

  ONESELF http://terminology.hl7.org/CodeSystem/v3-RoleCodeself

The relationship that a person has with his or her self.

  ROOM http://terminology.hl7.org/CodeSystem/v3-RoleCodeRoommate

One who shares living quarters with the subject.

Additional Language Displays

CodeDeutsch (German, de)
BPKontaktperson für Abrechnung
CPKontaktperson
EPKontaktperson für Notfälle
PRPerson, die die Überweisung vorbereitet
EArbeitgeber
CAnsprechpartner in Notfällen
FBundesbehörde
IVersicherung
NKontaktperson
SLandesbehörde
Oandere
Uunbekannt
_PersonalRelationshipRoleType
FAMMEMB
CHILD
CHLDADOPT
DAUADOPT
SONADOPT
CHLDFOST
DAUFOST
SONFOST
DAUC
DAU
STPDAU
NCHILD
SON
SONC
STPSON
STPCHLD
EXT
AUNT
MAUNT
PAUNT
COUSN
MCOUSN
PCOUSN
GGRPRN
GGRFTH
MGGRFTH
PGGRFTH
GGRMTH
MGGRMTH
PGGRMTH
MGGRPRN
PGGRPRN
GRNDCHILD
GRNDDAU
GRNDSON
GRPRN
GRFTH
MGRFTH
PGRFTH
GRMTH
MGRMTH
PGRMTH
MGRPRN
PGRPRN
INLAW
CHLDINLAW
DAUINLAW
SONINLAW
PRNINLAW
FTHINLAW
MTHINLAW
MTHINLOAW
SIBINLAW
BROINLAW
SISINLAW
SISLINLAW
NIENEPH
NEPHEW
NIECE
UNCLE
MUNCLE
PUNCLE
PRN
ADOPTP
ADOPTF
ADOPTM
FTH
FTHFOST
NFTH
NFTHF
STPFTH
MTH
GESTM
MTHFOST
NMTH
NMTHF
STPMTH
NPRN
PRNFOST
STPPRN
SIB
BRO
HBRO
NBRO
TWINBRO
FTWINBRO
ITWINBRO
STPBRO
HSIB
HSIS
NSIB
NSIS
TWINSIS
FTWINSIS
ITWINSIS
TWIN
FTWIN
ITWIN
SIS
STPSIS
STPSIB
SIGOTHR
DOMPART
FMRSPS
SPS
HUSB
WIFE
FRND
NBOR
ONESELF
ROOM

 

See the full registry of value sets defined as part of FHIR.


Explanation of the columns that may appear on this page:

LvlA few code lists that FHIR defines are hierarchical - each code is assigned a level. For value sets, levels are mostly used to organize codes for user convenience, but may follow code system hierarchy - see Code System for further information
SourceThe source of the definition of the code (when the value set draws in codes defined elsewhere)
CodeThe code (used as the code in the resource instance). If the code is in italics, this indicates that the code is not selectable ('Abstract')
DisplayThe display (used in the display element of a Coding). If there is no display, implementers should not simply display the code, but map the concept into their application
DefinitionAn explanation of the meaning of the concept
CommentsAdditional notes about how to use the code