{
  "resourceType" : "OperationDefinition",
  "id" : "search-from-Kanta",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: OperationDefinition search-from-Kanta</b></p><a name=\"search-from-Kanta\"> </a><a name=\"hcsearch-from-Kanta\"> </a><p>URL: [base]/Appointment/$search-from-Kanta</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>patientIdentifier</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Identifier\">Identifier</a></td><td/><td><div><p>patient.identifier - Identifier of the patient who is the subject of the appointment.</p>\n</div></td></tr><tr><td>IN</td><td>identifier</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Identifier\">Identifier</a></td><td/><td><div><p>appointment.identifier - Business identifier of the appointment.</p>\n</div></td></tr><tr><td>IN</td><td>serviceOrganiser</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Coding\">Coding</a></td><td/><td><div><p>Provenance.agent.who.identifier - Organiser of the booked service.</p>\n</div></td></tr><tr><td>IN</td><td>appointmentServiceProvider</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Coding\">Coding</a></td><td/><td><div><p>organization.partOf.identifier - Provider of the booked service. For social and health care organizations, the Kanta code system '1.2.246.537.6.202.2008' and a valid code value should be provided. For independent practitioners, use Kanta code system '1.2.246.537.6.203.2014'.</p>\n</div></td></tr><tr><td>IN</td><td>appointmentServiceProviderUnit</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Coding\">Coding</a></td><td/><td><div><p>organization.identifier - Organization where the booked service takes place. For social and health care organizations, the Kanta code system '1.2.246.537.6.202.2008' and a valid code should be provided. For independent practitioners, use Kanta code system '1.2.246.537.6.203.2014'.</p>\n</div></td></tr><tr><td>IN</td><td>producingServiceProviderUnit</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Coding\">Coding</a></td><td/><td><div><p>Provenance.agent.who.identifier - Organization that produced the Appointment resource. If this parameter is provided, the service provider parameter 'appointment-service-provider' must also be provided (in addition to the patient identifier). For social and health care organizations, the Kanta code system '1.2.246.537.6.202.2008' and a valid code should be provided. For independent practitioners, use Kanta code system '1.2.246.537.6.203.2014'.</p>\n</div></td></tr><tr><td>IN</td><td>date</td><td/><td>0..2</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#string\">string</a></td><td/><td><div><p>appointment.start – Start time of the appointment. The accepted date formats are yyyy-mm-dd, yyyy-mm-ddThh:mm:ss or yyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm]. A value entered without a time zone is treated as the Helsinki time zone. Mandatory prefix options include eq, gt, lt, ge, le. When two dates are provided, they must not include the eq prefix. The eq prefix can only be used with a single date.</p>\n</div></td></tr><tr><td>IN</td><td>recorded</td><td/><td>0..2</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#string\">string</a></td><td/><td><div><p>provenance.recorded - Creation time of the appointment, i.e. the moment when the Appointment resource was created. The accepted date formats are yyyy-mm-dd, yyyy-mm-ddThh:mm:ss or yyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm]. A value entered without a time zone is treated as the Helsinki time zone. Mandatory prefix options include eq, gt, lt, ge, le. When two recorded are provided, they must not include the eq prefix. The eq prefix can only be used with a single recorded.</p>\n</div></td></tr><tr><td>IN</td><td>registerTypeCode</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Coding\">Coding</a></td><td/><td><div><p>provenance.extension.RegisterType - Patient register identifier.</p>\n</div></td></tr><tr><td>IN</td><td>serviceEvent</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#string\">string</a></td><td/><td><div><p>provenance.extension.ServiceEvent - Service event identifier used as a search filter.</p>\n</div></td></tr><tr><td>IN</td><td>disclosureServiceEventId</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#string\">string</a></td><td/><td><div><p>Disclosure service event identifier. This parameter must be provided if performing a disclosure search.</p>\n</div></td></tr><tr><td>IN</td><td>includeOwn</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#boolean\">boolean</a></td><td/><td><div><p>Whether the search result should return data from the inquirer’s own register or exclude it (default: true).</p>\n</div></td></tr><tr><td>IN</td><td>count</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#integer\">integer</a></td><td/><td><div><p>Maximum number of search results to return in one response. When continuing a paged search, provide resultSetKey and originalXRequestId along with the same count value as in the previous search request.</p>\n</div></td></tr><tr><td>IN</td><td>resultSetKey</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Identifier\">Identifier</a></td><td/><td><div><p>Result set identifier used for continuing a paged appointment search. This parameter must be provided together with originalXRequestId and count. Omit both resultSetKey and originalXRequestId when starting a new search.</p>\n</div></td></tr><tr><td>IN</td><td>originalXRequestId</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#string\">string</a></td><td/><td><div><p>Original X-Request-ID used for continuing a paged appointment search. This parameter must be provided together with resultSetKey and count. Omit both resultSetKey and originalXRequestId when starting a new search.</p>\n</div></td></tr><tr><td>IN</td><td>confirmed-protected-content</td><td/><td>0..*</td><td></td><td/><td><div><p>Codes of protected contents views that are included in the search result, and information on whether viewing the protected content has been confirmed automatically. The user must be asked for separate confirmation before showing protected content unless viewing that content has been separately defined as part of the user's work tasks.</p>\n</div></td></tr><tr><td>IN</td><td>confirmed-protected-content.content</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Coding\">Coding</a></td><td><a href=\"ValueSet-fipta-vs-tableofcontentsprotected.html\">fipta-vs-tableofcontentsprotected</a> (Required)</td><td><div><p>The value must be from ValueSet fipta-vs-tableofcontentsprotected.</p>\n</div></td></tr><tr><td>IN</td><td>confirmed-protected-content.automatic</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#boolean\">boolean</a></td><td/><td><div><p>Whether viewing the protected content has been confirmed automatically without asking the user. The default value is false.</p>\n</div></td></tr><tr><td>IN</td><td>confirmed-protected-content.reason</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#string\">string</a></td><td/><td><div><p>Optional free-text reason for showing the protected content.</p>\n</div></td></tr><tr><td>OUT</td><td>return</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/bundle.html\">Bundle</a></td><td/><td><div><p>Appointment and Provenance (appointment meta information) resource pairs that matched the given search parameters. If search results were filtered because of protected content, the response Bundle also contains an OperationOutcome that describes which protected table of contents views were omitted from the result.</p>\n</div></td></tr></table></div>"
  },
  "url" : "https://eradocumentation.atostek.com/OperationDefinition/Appointment-search-from-Kanta",
  "version" : "1.0.0",
  "name" : "search-from-Kanta",
  "title" : "AppointmentFi Search From Kanta",
  "status" : "draft",
  "kind" : "operation",
  "date" : "2026-10-28T11:52:12+00:00",
  "publisher" : "Atostek",
  "contact" : [{
    "name" : "Atostek",
    "telecom" : [{
      "system" : "url",
      "value" : "https://atostek.com/"
    }]
  }],
  "description" : "The operation can be used to search for appointments from the Kanta Patient Data Repository. \n\nThe operation requires an active ERA session and the client registry ID. Please provide these in the request header.",
  "code" : "search-from-Kanta",
  "resource" : ["Appointment"],
  "system" : false,
  "type" : true,
  "instance" : false,
  "parameter" : [{
    "name" : "patientIdentifier",
    "use" : "in",
    "min" : 1,
    "max" : "1",
    "documentation" : "patient.identifier - Identifier of the patient who is the subject of the appointment.",
    "type" : "Identifier"
  },
  {
    "name" : "identifier",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "appointment.identifier - Business identifier of the appointment.",
    "type" : "Identifier"
  },
  {
    "name" : "serviceOrganiser",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "Provenance.agent.who.identifier - Organiser of the booked service.",
    "type" : "Coding"
  },
  {
    "name" : "appointmentServiceProvider",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "organization.partOf.identifier - Provider of the booked service. For social and health care organizations, the Kanta code system '1.2.246.537.6.202.2008' and a valid code value should be provided. For independent practitioners, use Kanta code system '1.2.246.537.6.203.2014'.",
    "type" : "Coding"
  },
  {
    "name" : "appointmentServiceProviderUnit",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "organization.identifier - Organization where the booked service takes place. For social and health care organizations, the Kanta code system '1.2.246.537.6.202.2008' and a valid code should be provided. For independent practitioners, use Kanta code system '1.2.246.537.6.203.2014'.",
    "type" : "Coding"
  },
  {
    "name" : "producingServiceProviderUnit",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "Provenance.agent.who.identifier - Organization that produced the Appointment resource. If this parameter is provided, the service provider parameter 'appointment-service-provider' must also be provided (in addition to the patient identifier). For social and health care organizations, the Kanta code system '1.2.246.537.6.202.2008' and a valid code should be provided. For independent practitioners, use Kanta code system '1.2.246.537.6.203.2014'.",
    "type" : "Coding"
  },
  {
    "name" : "date",
    "use" : "in",
    "min" : 0,
    "max" : "2",
    "documentation" : "appointment.start – Start time of the appointment. The accepted date formats are yyyy-mm-dd, yyyy-mm-ddThh:mm:ss or yyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm]. A value entered without a time zone is treated as the Helsinki time zone. Mandatory prefix options include eq, gt, lt, ge, le. When two dates are provided, they must not include the eq prefix. The eq prefix can only be used with a single date.",
    "type" : "string"
  },
  {
    "name" : "recorded",
    "use" : "in",
    "min" : 0,
    "max" : "2",
    "documentation" : "provenance.recorded - Creation time of the appointment, i.e. the moment when the Appointment resource was created. The accepted date formats are yyyy-mm-dd, yyyy-mm-ddThh:mm:ss or yyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm]. A value entered without a time zone is treated as the Helsinki time zone. Mandatory prefix options include eq, gt, lt, ge, le. When two recorded are provided, they must not include the eq prefix. The eq prefix can only be used with a single recorded.",
    "type" : "string"
  },
  {
    "name" : "registerTypeCode",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "provenance.extension.RegisterType - Patient register identifier.",
    "type" : "Coding"
  },
  {
    "name" : "serviceEvent",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "provenance.extension.ServiceEvent - Service event identifier used as a search filter.",
    "type" : "string"
  },
  {
    "name" : "disclosureServiceEventId",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "Disclosure service event identifier. This parameter must be provided if performing a disclosure search.",
    "type" : "string"
  },
  {
    "name" : "includeOwn",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "Whether the search result should return data from the inquirer’s own register or exclude it (default: true).",
    "type" : "boolean"
  },
  {
    "name" : "count",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "Maximum number of search results to return in one response. When continuing a paged search, provide resultSetKey and originalXRequestId along with the same count value as in the previous search request.",
    "type" : "integer"
  },
  {
    "name" : "resultSetKey",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "Result set identifier used for continuing a paged appointment search. This parameter must be provided together with originalXRequestId and count. Omit both resultSetKey and originalXRequestId when starting a new search.",
    "type" : "Identifier"
  },
  {
    "name" : "originalXRequestId",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "Original X-Request-ID used for continuing a paged appointment search. This parameter must be provided together with resultSetKey and count. Omit both resultSetKey and originalXRequestId when starting a new search.",
    "type" : "string"
  },
  {
    "name" : "confirmed-protected-content",
    "use" : "in",
    "min" : 0,
    "max" : "*",
    "documentation" : "Codes of protected contents views that are included in the search result, and information on whether viewing the protected content has been confirmed automatically. The user must be asked for separate confirmation before showing protected content unless viewing that content has been separately defined as part of the user's work tasks.",
    "part" : [{
      "name" : "content",
      "use" : "in",
      "min" : 1,
      "max" : "1",
      "documentation" : "The value must be from ValueSet fipta-vs-tableofcontentsprotected.",
      "type" : "Coding",
      "binding" : {
        "strength" : "required",
        "valueSet" : "https://pta.kanta.fi/fhir/ValueSet/fipta-vs-tableofcontentsprotected"
      }
    },
    {
      "name" : "automatic",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "Whether viewing the protected content has been confirmed automatically without asking the user. The default value is false.",
      "type" : "boolean"
    },
    {
      "name" : "reason",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "Optional free-text reason for showing the protected content.",
      "type" : "string"
    }]
  },
  {
    "name" : "return",
    "use" : "out",
    "min" : 1,
    "max" : "1",
    "documentation" : "Appointment and Provenance (appointment meta information) resource pairs that matched the given search parameters. If search results were filtered because of protected content, the response Bundle also contains an OperationOutcome that describes which protected table of contents views were omitted from the result.",
    "type" : "Bundle"
  }]
}