Skip to content

RelatedPerson Profile

Canonical../StructureDefinition/nexus-emr-core-relatedperson
Statusdraft · 1.26.0
BaseRelatedPerson (constraint)
SourceFSH · JSON

Nexus EMR profile for RelatedPerson, capturing an alternative contact for a patient — a person the practice can reach on the patient's behalf, with a personal relationship, any number of contact purposes, contact details, an optional note, and an optional primary (call-first) flag. Backs the Patient Profile Relationships section.

FSH

The authored source of truth: resources/StructureDefinition-nexus-emr-core-relatedperson.fsh (edit on GitHub). One FSH file may define several related artifacts.

// NexusEmrCoreRelatedPerson.fsh
// Defines the Nexus EMR RelatedPerson profile — an alternative contact for a
// patient (a person the practice can reach on the patient's behalf). Backs the
// Patient Profile "Relationships" section in the frontend.

Alias: $NexusEmrCoreRelatedPerson = ../StructureDefinition/nexus-emr-core-relatedperson

// Profile Definition
Profile:        NexusEmrCoreRelatedPerson
Parent:         RelatedPerson
Id:             nexus-emr-core-relatedperson
Title:          "RelatedPerson Profile"
Description:    "Nexus EMR profile for RelatedPerson, capturing an alternative contact for a patient — a person the practice can reach on the patient's behalf, with a personal relationship, any number of contact purposes, contact details, an optional note, and an optional primary (call-first) flag. Backs the Patient Profile Relationships section."
* ^url = $NexusEmrCoreRelatedPerson // Canonical URL from alias
* ^status = #draft

* . ^short      = "Nexus EMR RelatedPerson Core"
* . ^definition = """
  Represents an alternative contact linked to a patient. The personal relationship is drawn
  from the official RelatedPerson relationship-type value set — HL7 v3
  PersonalRelationshipRoleType concepts plus the v2-0131 "O" (Other) member — with v3
  RoleCode GUARD (guardian) covering the legal guardian the set has no concept for; zero or
  more contact purposes from the Nexus EMR contact-purpose system may accompany it in the
  same relationship array. At most one related person per patient carries the primary
  (call-first) flag.
  """

// THE effective date for this profile (see the EffectiveDate / NoEffectiveDate
// RuleSets): none. A contact is a party, not a dated event. `birthDate` is not an
// effective date (same call as Patient) and `period` is the contact's validity window;
// without this declaration a consumer derives birthDate and invents a date.
* insert NoEffectiveDate

// SMART on FHIR exposure -- this resource is reachable by an app, and these are the
// permissions each operation costs (see SmartExposed + the SmartExposed RuleSet).
* insert SmartExposed(relatedperson)

* meta.source 0..1 MS
* meta.source ^short = "Identifies EMR instance & pipeline version the resource came from"
* meta.source ^definition = "A URI that identifies the EMR pipeline and version from which this resource originated."

* text 0..1 MS // Narrative element with human-readable summary
* text ^short = "Narrative"
* text ^definition = "A human-readable narrative summary of the NexusEmrCoreRelatedPerson resource for human interpretation."

// -----------------------------------------
// Primary flag + note extensions
// -----------------------------------------
* extension contains
    ContactPrimaryExtension named primary 0..1 MS and
    ContactNoteExtension named note 0..1 MS
* extension[primary] ^short = "Whether this is the primary (call-first) contact"
* extension[note] ^short = "Free-text note about the contact"

// -----------------------------------------
// Patient — the patient this person is a contact for
// -----------------------------------------
* patient 1..1 MS
* patient ^short = "The patient this person is a contact for"
* patient ^definition = "The patient on whose behalf this person can be contacted."
* patient only Reference(Patient)

// -----------------------------------------
// Relationship — personal relationship and contact purposes
// -----------------------------------------
* relationship 0..* MS
* relationship ^short = "Personal relationship to the patient, plus any contact purposes"
* relationship ^comment = "Carries the personal relationship (a member of the official relatedperson-relationshiptype value set — HL7 v3 PersonalRelationshipRoleType or v2-0131 'O' — with v3 RoleCode GUARD for legal guardian) and zero or more contact purposes (the local contact-purpose system, dual-coded with an official v2-0131 / v3 RoleCode / v3 RoleClass code where one exists). Readers discriminate the relationship by matching system AND code against the relationship value set. Where this code was mapped from a source system's own vocabulary, carry the raw coding alongside the mapped one, flagged `userSelected = true`. See [Carrying the raw code](../guide/patterns/raw-codes.md)."

// -----------------------------------------
// Name and telecom — the contact's details
// -----------------------------------------
* name 0..* MS
* name ^short = "The contact's name"
* telecom 0..* MS
* telecom ^short = "The contact's phone numbers and e-mail (a work number's extension rides on the contact-point-phone-extension)"