Athena Core Implementation Guide
5.15.0 - release

Athena Core Implementation Guide - Local Development build (v5.15.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

: Patient Reason for Visit - JSON Representation

Draft as of 2026-10-23

Raw json | Download

{
  "resourceType" : "OperationDefinition",
  "id" : "ah-questionnaireresponse-patient-reason-for-visit",
  "meta" : {
    "source" : "athenacoreext"
  },
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: OperationDefinition ah-questionnaireresponse-patient-reason-for-visit</b></p><a name=\"ah-questionnaireresponse-patient-reason-for-visit\"> </a><a name=\"hcah-questionnaireresponse-patient-reason-for-visit\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Information Source: <a href=\"https://simplifier.net/resolve?scope=ig-athena-core@dev&amp;canonical=https://fhir.athena.io/core/athenacoreext\">athenacoreext</a></p></div><p>URL: [base]/QuestionnaireResponse/$patient-reason-for-visit</p><h3>Parameters</h3><table class=\"grid\"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Scope</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>questionnaireResponse</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\">QuestionnaireResponse</a></td><td/><td><div><p>Must conform to https://fhir.athena.io/StructureDefinition/ah-patient-reason-for-visit.</p>\n</div></td></tr><tr><td>OUT</td><td>warning</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/operationoutcome.html\">OperationOutcome</a></td><td/><td><div><p>Non-fatal advisory information about the matching attempt (e.g. low-confidence input, ambiguous text).</p>\n</div></td></tr><tr><td>OUT</td><td>match</td><td/><td>0..*</td><td/><td/><td><div><p>A candidate appointment service-type match for the supplied reason for visit.</p>\n</div></td></tr><tr><td>OUT</td><td>match.rank</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#positiveInt\">positiveInt</a></td><td/><td><div><p>Ordinal position of this match among all matches returned for the same response, where 1 is the best match. Rank is stable within a single operation invocation but MUST NOT be compared across different invocations or different QuestionnaireResponse inputs.</p>\n</div></td></tr><tr><td>OUT</td><td>match.score</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#decimal\">decimal</a></td><td/><td><div><p>Relative confidence score for this match, expressed as a decimal in the range [0, 1]. Scores are meaningful only when compared against other matches returned for the same QuestionnaireResponse input; they MUST NOT be compared across different inputs or invocations.</p>\n</div></td></tr><tr><td>OUT</td><td>match.serviceType</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Coding\">Coding</a></td><td><a href=\"ValueSet-ah-appointment-service-type.html\">athenahealth Appointment Service Type</a> (Required)</td><td><div><p>The appointment service-type coding that this match proposes. The coding is drawn from the ah-appointment-service-type value set and corresponds to the service type that the matching algorithm considers most consistent with the patient-supplied reason for visit.</p>\n</div></td></tr></table></div>"
  },
  "url" : "https://fhir.athena.io/OperationDefinition/ah-questionnaireresponse-patient-reason-for-visit",
  "version" : "5.15.0",
  "name" : "PatientReasonForVisit",
  "title" : "Patient Reason for Visit",
  "status" : "draft",
  "kind" : "operation",
  "date" : "2026-10-23T13:45:59+00:00",
  "publisher" : "athenahealth",
  "contact" : [
    {
      "name" : "FHIR Enablement Team",
      "telecom" : [
        {
          "system" : "email",
          "value" : "mailto:fhir-enablement@athenahealth.com"
        }
      ]
    }
  ],
  "affectsState" : false,
  "code" : "patient-reason-for-visit",
  "resource" : [
    "QuestionnaireResponse"
  ],
  "system" : false,
  "type" : true,
  "instance" : false,
  "parameter" : [
    {
      "name" : "questionnaireResponse",
      "use" : "in",
      "min" : 1,
      "max" : "1",
      "documentation" : "Must conform to https://fhir.athena.io/StructureDefinition/ah-patient-reason-for-visit.",
      "type" : "QuestionnaireResponse"
    },
    {
      "name" : "warning",
      "use" : "out",
      "min" : 0,
      "max" : "1",
      "documentation" : "Non-fatal advisory information about the matching attempt (e.g. low-confidence input, ambiguous text).",
      "type" : "OperationOutcome"
    },
    {
      "name" : "match",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "documentation" : "A candidate appointment service-type match for the supplied reason for visit.",
      "part" : [
        {
          "name" : "rank",
          "use" : "out",
          "min" : 1,
          "max" : "1",
          "documentation" : "Ordinal position of this match among all matches returned for the same response, where 1 is the best match. Rank is stable within a single operation invocation but MUST NOT be compared across different invocations or different QuestionnaireResponse inputs.",
          "type" : "positiveInt"
        },
        {
          "name" : "score",
          "use" : "out",
          "min" : 0,
          "max" : "1",
          "documentation" : "Relative confidence score for this match, expressed as a decimal in the range [0, 1]. Scores are meaningful only when compared against other matches returned for the same QuestionnaireResponse input; they MUST NOT be compared across different inputs or invocations.",
          "type" : "decimal"
        },
        {
          "name" : "serviceType",
          "use" : "out",
          "min" : 1,
          "max" : "1",
          "documentation" : "The appointment service-type coding that this match proposes. The coding is drawn from the ah-appointment-service-type value set and corresponds to the service type that the matching algorithm considers most consistent with the patient-supplied reason for visit.",
          "type" : "Coding",
          "binding" : {
            "strength" : "required",
            "valueSet" : "https://fhir.athena.io/ValueSet/ah-appointment-service-type"
          }
        }
      ]
    }
  ]
}