{
  "resourceType": "StructureDefinition",
  "id": "FamilyMemberHistoryPSAB",
  "url": "https://www.alberta.ca/fhir/psab/StructureDefinition/FamilyMemberHistoryPSAB",
  "version": "1.2.0",
  "name": "FamilyMemberHistoryPSAB",
  "title": "FamilyMemberHistory (PS-AB)",
  "status": "draft",
  "description": "This profile defines a set of constraints to the FHIR FamilyMemberHistory resource for use in Alberta Patient Summaries (PS-AB). It re-profiles the PS-CA FamilyMemberHistory profile and refines the constraints that represent the minimum expectations for the FamilyMemberHistory resource when used in the PS-AB Composition profile.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "FamilyMemberHistory",
  "baseDefinition": "http://fhir.infoway-inforoute.ca/io/psca/StructureDefinition/familymemberhistory-ca-ps",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "FamilyMemberHistory",
        "path": "FamilyMemberHistory",
        "comment": "FamilyMemberHistory resources included in Alberta Patient Summary Document Bundles have rules that certain attributes are not to be contained in FamilyMemberHistory resource. These are mechanically enforced through invariants at the PS-AB Bundle level."
      },
      {
        "id": "FamilyMemberHistory.patient",
        "path": "FamilyMemberHistory.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.alberta.ca/fhir/psab/StructureDefinition/PatientPSAB"
            ]
          }
        ]
      },
      {
        "id": "FamilyMemberHistory.relationship",
        "path": "FamilyMemberHistory.relationship",
        "binding": {
          "strength": "preferred",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/personalrelationshipcodes"
        }
      },
      {
        "id": "FamilyMemberHistory.relationship.text",
        "path": "FamilyMemberHistory.relationship.text",
        "comment": "The full label of the family relationship (e.g., 'brother', 'sister', 'grandmother', etc.). Abbreviations are not allowed, to avoid confusion or misinterpretation. String: Max Character length (20) Required if a family history condition or characteristic is submitted.",
        "min": 1
      },
      {
        "id": "FamilyMemberHistory.note",
        "path": "FamilyMemberHistory.note",
        "comment": "Some form of note is required if family history data is being submitted. FamilyMemberHistory.note is used when the note cannot be distinctly tied to the condition property (i.e., familyMemberHistory.condition.note)."
      },
      {
        "id": "FamilyMemberHistory.note.text",
        "path": "FamilyMemberHistory.note.text",
        "comment": "Required if FamilyMemberHistory.note is populated."
      },
      {
        "id": "FamilyMemberHistory.condition",
        "path": "FamilyMemberHistory.condition",
        "mustSupport": true
      },
      {
        "id": "FamilyMemberHistory.condition.onset[x]",
        "path": "FamilyMemberHistory.condition.onset[x]",
        "comment": "Required if a family history condition or characteristic is submitted. May contain a number (age or year), or a textual description of an age, age range or life stage.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "FamilyMemberHistory.condition.note",
        "path": "FamilyMemberHistory.condition.note",
        "mustSupport": true
      },
      {
        "id": "FamilyMemberHistory.condition.note.text",
        "path": "FamilyMemberHistory.condition.note.text",
        "comment": "Required if FamilyMemberHistory.condition.note is populated."
      }
    ]
  }
}