Release 4B

This page is part of the FHIR Specification (v4.3.0: R4B - STU). 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.342 Value Set 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:4.3.0
Name:PatientRelationshipType
Title:
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)
Source ResourceXML / JSON

This value set is used in the following places:


This value set includes codes based on the following rules:

 

This expansion generated 28 May 2022


This value set contains 123 concepts

CodeSystemDisplayDefinition
  BP http://terminology.hl7.org/CodeSystem/v2-0131Billing contact personBilling contact person
  CP http://terminology.hl7.org/CodeSystem/v2-0131Contact personContact person
  EP http://terminology.hl7.org/CodeSystem/v2-0131Emergency contact personEmergency contact person
  PR http://terminology.hl7.org/CodeSystem/v2-0131Person preparing referralPerson preparing referral
  E http://terminology.hl7.org/CodeSystem/v2-0131EmployerEmployer
  C http://terminology.hl7.org/CodeSystem/v2-0131Emergency ContactEmergency Contact
  F http://terminology.hl7.org/CodeSystem/v2-0131Federal AgencyFederal Agency
  I http://terminology.hl7.org/CodeSystem/v2-0131Insurance CompanyInsurance Company
  N http://terminology.hl7.org/CodeSystem/v2-0131Next-of-KinNext-of-Kin
  S http://terminology.hl7.org/CodeSystem/v2-0131State AgencyState Agency
  O http://terminology.hl7.org/CodeSystem/v2-0131OtherOther
  U http://terminology.hl7.org/CodeSystem/v2-0131UnknownUnknown
  _PersonalRelationshipRoleType http://terminology.hl7.org/CodeSystem/v3-RoleCodePersonalRelationshipRoleType
  FAMMEMB http://terminology.hl7.org/CodeSystem/v3-RoleCodefamily memberA relationship between two people characterizing their "familial" relationship
  CHILD http://terminology.hl7.org/CodeSystem/v3-RoleCodechildThe player of the role is a child of the scoping entity.
  CHLDADOPT http://terminology.hl7.org/CodeSystem/v3-RoleCodeadopted childThe 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 daughterThe 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 sonThe 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 childThe 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 daughterThe 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 sonThe 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 daughterThe player of the role is a female offspring of the scoping entity (parent).
  STPDAU http://terminology.hl7.org/CodeSystem/v3-RoleCodestepdaughterThe 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 childThe player of the role is an offspring of the scoping entity as determined by birth.
  SON http://terminology.hl7.org/CodeSystem/v3-RoleCodenatural sonThe 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-RoleCodestepsonThe 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 childThe 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-RoleCodeauntThe 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-RoleCodecousinThe 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 grandparentThe player of the role is a parent of the scoping person's grandparent.
  GGRFTH http://terminology.hl7.org/CodeSystem/v3-RoleCodegreat grandfatherThe 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 grandmotherThe 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-RoleCodegrandchildThe player of the role is a child of the scoping person's son or daughter.
  GRNDDAU http://terminology.hl7.org/CodeSystem/v3-RoleCodegranddaughterThe player of the role is a daughter of the scoping person's son or daughter.
  GRNDSON http://terminology.hl7.org/CodeSystem/v3-RoleCodegrandsonThe player of the role is a son of the scoping person's son or daughter.
  GRPRN http://terminology.hl7.org/CodeSystem/v3-RoleCodegrandparentThe player of the role is a parent of the scoping person's mother or father.
  GRFTH http://terminology.hl7.org/CodeSystem/v3-RoleCodegrandfatherThe 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-RoleCodegrandmotherThe 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-RoleCodeinlawA relationship between an individual and a member of their spousal partner's immediate family.
  CHLDINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodechild-in-lawThe player of the role is the spouse of scoping person's child.
  DAUINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodedaughter in-lawThe player of the role is the wife of scoping person's son.
  SONINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodeson in-lawThe player of the role is the husband of scoping person's daughter.
  PRNINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodeparent in-lawThe player of the role is the parent of scoping person's husband or wife.
  FTHINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodefather-in-lawThe player of the role is the father of the scoping person's husband or wife.
  MTHINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodemother-in-lawThe player of the role is the mother of the scoping person's husband or wife.
  MTHINLOAW http://terminology.hl7.org/CodeSystem/v3-RoleCodemother-in-lawThe player of the role is the mother of the scoping person's husband or wife.
  SIBINLAW http://terminology.hl7.org/CodeSystem/v3-RoleCodesibling in-lawThe 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-lawThe 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-lawThe 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-lawThe 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/nephewThe 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-RoleCodenephewThe 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-RoleCodenieceThe 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-RoleCodeuncleThe 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-RoleCodeparentThe 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 parentThe 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 fatherThe 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 motherThe 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-RoleCodefatherThe 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 fatherThe 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 fatherThe player of the role is a male who begets the scoping entity (child).
  NFTHF http://terminology.hl7.org/CodeSystem/v3-RoleCodenatural father of fetusIndicates the biologic male parent of a fetus.
  STPFTH http://terminology.hl7.org/CodeSystem/v3-RoleCodestepfatherThe 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-RoleCodemotherThe 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 motherThe 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 motherThe 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 motherThe 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 fetusThe player is the biologic female parent of the scoping fetus.
  STPMTH http://terminology.hl7.org/CodeSystem/v3-RoleCodestepmotherThe 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 parentThe 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 parentThe 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-RoleCodesiblingThe player of the role shares one or both parents in common with the scoping entity.
  BRO http://terminology.hl7.org/CodeSystem/v3-RoleCodebrotherThe 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-brotherThe 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 brotherThe player of the role is a male having the same biological parents as the scoping entity.
  TWINBRO http://terminology.hl7.org/CodeSystem/v3-RoleCodetwin brotherThe 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 brotherThe 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 brotherThe male scoper is an offspring of the same egg-sperm pair as the male player.
  STPBRO http://terminology.hl7.org/CodeSystem/v3-RoleCodestepbrotherThe player of the role is a son of the scoping person's stepparent.
  HSIB http://terminology.hl7.org/CodeSystem/v3-RoleCodehalf-siblingThe player of the role is related to the scoping entity by sharing only one biological parent.
  HSIS http://terminology.hl7.org/CodeSystem/v3-RoleCodehalf-sisterThe 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 siblingThe player of the role has both biological parents in common with the scoping entity.
  NSIS http://terminology.hl7.org/CodeSystem/v3-RoleCodenatural sisterThe player of the role is a female having the same biological parents as the scoping entity.
  TWINSIS http://terminology.hl7.org/CodeSystem/v3-RoleCodetwin sisterThe 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 sisterThe 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 sisterThe female scoper is an offspring of the same egg-sperm pair as the female player.
  TWIN http://terminology.hl7.org/CodeSystem/v3-RoleCodetwinThe scoper and player were carried in the same womb and shared common biological parents.
  FTWIN http://terminology.hl7.org/CodeSystem/v3-RoleCodefraternal twinThe 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 twinThe scoper and player are offspring of the same egg-sperm pair.
  SIS http://terminology.hl7.org/CodeSystem/v3-RoleCodesisterThe 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-RoleCodestepsisterThe player of the role is a daughter of the scoping person's stepparent.
  STPSIB http://terminology.hl7.org/CodeSystem/v3-RoleCodestep siblingThe player of the role is a child of the scoping person's stepparent.
  SIGOTHR http://terminology.hl7.org/CodeSystem/v3-RoleCodesignificant otherA 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 partnerThe 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 spousePlayer 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-RoleCodespouseThe player of the role is a marriage partner of the scoping person.
  HUSB http://terminology.hl7.org/CodeSystem/v3-RoleCodehusbandThe player of the role is a man joined to a woman (scoping person) in marriage.
  WIFE http://terminology.hl7.org/CodeSystem/v3-RoleCodewifeThe player of the role is a woman joined to a man (scoping person) in marriage.
  FRND http://terminology.hl7.org/CodeSystem/v3-RoleCodeunrelated friendThe player of the role is a person who is known, liked, and trusted by the scoping person.
  NBOR http://terminology.hl7.org/CodeSystem/v3-RoleCodeneighborThe player of the role lives near or next to the scoping person.
  ONESELF http://terminology.hl7.org/CodeSystem/v3-RoleCodeselfThe relationship that a person has with his or her self.
  ROOM http://terminology.hl7.org/CodeSystem/v3-RoleCodeRoommateOne 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