Agenda

Hint

For each request on this page you need to add identication data. More information about this can be found in Identification / access chapter.

Getting slots using parameters for blocktypes, agendas and period

To get free slots in the agenda with specifying the period, you have to specify the exact agendas and blocktypes as well.

Get block types

Hint

The reponse of this won’t change often, please cache the output and only renew the data when the practice makes changes to the block types.

To get blocktypes, better known as “kleurtjes” (colors) in Bricks Huisarts:

Request

{
    "Name": "{{name}}",
    "Key": "{{key}}",
    "Target": "{{target}}",
    "Method": "GetBlokTypes"
}
<?xml version="1.0" encoding="utf-16"?>
<Tetra_Agenda_GetBlokTypes_Verzoek xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="-1002">
  <Identificatie xsi:type="OZB_Communicatie_Identificatie_Servertoken" Id="-1001">
    <Sessie>[session token]</Sessie>
  </Identificatie>
  <OntvangerEntiteit>[practice code]</OntvangerEntiteit>
  <ZenderIP>127.0.0.1</ZenderIP>
</Tetra_Agenda_GetBlokTypes_Verzoek>

Reponse

You need to cache the response of this request!
This data is not changing on a regular basis.
{
    "bloktypes": [
        {
            "Id": 10003,
            "Naam": "Telefonisch spreekuur",
            "Kleur": "FF7F80",
            "AfspraakDuurMinuten": 50
        },
        {
            "Id": 10049,
            "Naam": "Visite  ",
            "Kleur": "55289A",
            "AfspraakDuurMinuten": 150
        },
        {
            "Id": 10052,
            "Naam": "Consult 10min",
            "Kleur": "4C1F1A",
            "AfspraakDuurMinuten": 100
        },
        {
            "Id": 10059,
            "Naam": "Niet plannen",
            "Kleur": "2E9A9C",
            "AfspraakDuurMinuten": 100
        }
    ],
    "ReturnValue": {
        "ResponseCode": 200,
        "ResponseText": "OK",
        "Melding": "OK",
        "Gelukt": true
    }
}

Response values

  • Id: Block type ID

  • Naam: Block type name

  • Kleur: HEX color used in Bricks Huisarts

  • AfspraakDuurMinuten: Appointment length in minutes multiplied by 10

<?xml version="1.0" encoding="utf-16"?>
<Tetra_Agenda_GetBlokTypes_Antwoord xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="-1000">
  <CommunicatieStatus>OZB_Communicatie_Status_Verzoek_is_geslaagd</CommunicatieStatus>
  <ObjectOmschrijvingen>
    <OZB_Communicatie_ObjectOmschrijving Id="10001">
      <KorteOmschrijving>Koffie</KorteOmschrijving>
    </OZB_Communicatie_ObjectOmschrijving>
    <OZB_Communicatie_ObjectOmschrijving Id="10003">
      <KorteOmschrijving>Telefonisch SpreekUur</KorteOmschrijving>
    </OZB_Communicatie_ObjectOmschrijving>
    <OZB_Communicatie_ObjectOmschrijving Id="10049">
      <KorteOmschrijving>Visite  </KorteOmschrijving>
    </OZB_Communicatie_ObjectOmschrijving>
    <OZB_Communicatie_ObjectOmschrijving Id="10052">
      <KorteOmschrijving>consult</KorteOmschrijving>
    </OZB_Communicatie_ObjectOmschrijving>
    <OZB_Communicatie_ObjectOmschrijving Id="10059">
      <KorteOmschrijving>Spoedplekjes</KorteOmschrijving>
    </OZB_Communicatie_ObjectOmschrijving>
    ...
  </ObjectOmschrijvingen>
</Tetra_Agenda_GetBlokTypes_Antwoord>

Now we have the ids of colors, for example 10052 is for “consult” with a length 10 minutes.

Get agendas

Hint

The reponse of this won’t change often, please cache the output and only renew the data when the practice makes changes to the agendas.

Then we need to specify the agendas needed:

Request

{
   "Name": "{{name}}",
   "Key": "{{key}}",
   "Target": "{{target}}",
   "Method": "GetAgendas"
}
<?xml version="1.0" encoding="utf-16"?>
<Tetra_Agenda_GetAgendas_Verzoek xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="-1002">
  <Identificatie xsi:type="OZB_Communicatie_Identificatie_Servertoken" Id="-1001">
    <Token>[token id]</Token>
  </Identificatie>
  <OntvangerEntiteit>[practice code]</OntvangerEntiteit>
</Tetra_Agenda_GetAgendas_Verzoek>

Reponse

You need to cache the response of this request, cache is needed for configuration purposes.
Besides that, this data is not changing on a regular basis and less requests will speed up the process of making appointments.
{
    "agendas": [
        {
            "Id": 10013,
            "Naam": "Harry v.d. Ploeg"
        },
        {
            "Id": 10082,
            "Naam": "Kees van Sichem"
        },
        {
            "Id": 10083,
            "Naam": "POH DM"
        }
    ],
    "ReturnValue": {
        "ResponseCode": 200,
        "ResponseText": "OK",
        "Melding": "OK",
        "Gelukt": true
    }
}
<?xml version="1.0" encoding="utf-16"?>
<Tetra_Agenda_GetAgendas_Antwoord xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="-1000">
  <CommunicatieStatus>OZB_Communicatie_Status_Verzoek_is_geslaagd</CommunicatieStatus>
  <ObjectOmschrijvingen>
    <OZB_Communicatie_ObjectOmschrijving Id="10013">
      <KorteOmschrijving>Harry v.d. Ploeg</KorteOmschrijving>
    </OZB_Communicatie_ObjectOmschrijving>
    <OZB_Communicatie_ObjectOmschrijving Id="10055">
      <KorteOmschrijving>Sjaak Haak</KorteOmschrijving>
    </OZB_Communicatie_ObjectOmschrijving>
    ...
  </ObjectOmschrijvingen>
</Tetra_Agenda_GetAgendas_Antwoord>

Again id’s, we’ll choose the first two: 10013 and 10055. The last step is to ask for the actual slots by selecting a period:

Get time slots

Warning

Do not cache the response of this request. Available slots can also be booked by the practice/patients/etc, the response isn’t being “locked”!

Request

{
  "Name": "{{name}}",
  "Key": "{{key}}",
  "Target": "{{target}}",
  "Method": "GetSlots",
  "agendaIds": [10090],
  "blokTypeIds": [10125, 10130],
  "van": "2023-05-24T08:00:00",
  "tot": "2023-05-25T18:00:00",
  "alleenOpen": true
}

Response values

  • blokTypeIds: ID’s of block types to include

  • agendaIds: ID’s of agendas to query

  • van: Start of the slot selection

  • tot: End of the slot selection

  • alleenOpen: boolean (true: only available slots are returned)

<?xml version="1.0" encoding="utf-16"?>
<Tetra_Agenda_GetSlotsParameters_Verzoek xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="-1000">
  <Identificatie xsi:type="OZB_Communicatie_Identificatie_Servertoken" Id="-1001">
    <Sessie>[session token]</Sessie>
  </Identificatie>
  <OntvangerEntiteit>[practice code]</OntvangerEntiteit>
  <Start>2014-07-29T00:00:00+02:00</Start>
  <Eind>2014-08-01T00:00:00+02:00</Eind>
  <Bloktypen>
    <Tetra_Agenda_BlokType Id="10052">
      <Kleur>0</Kleur>
      <AfspraakDuurMinuten>0</AfspraakDuurMinuten>
    </Tetra_Agenda_BlokType>
    <Tetra_Agenda_BlokType Id="10064">
      <Kleur>0</Kleur>
      <AfspraakDuurMinuten>0</AfspraakDuurMinuten>
    </Tetra_Agenda_BlokType>
  </Bloktypen>
  <Agendas>
    <Tetra_Agenda Id="10013" />
    <Tetra_Agenda Id="10055" />
  </Agendas>
</Tetra_Agenda_GetSlotsParameters_Verzoek>

Response

{
  "slots": [
      {
          "Start": "2023-05-24T08:00:00",
          "Eind": "2023-05-24T08:05:00",
          "IsVrij": true,
          "AgendaId": 10090
      },
      {
          "Start": "2023-05-24T08:05:00",
          "Eind": "2023-05-24T08:10:00",
          "IsVrij": true,
          "AgendaId": 10090
      },
      {
          "Start": "2023-05-24T08:10:00",
          "Eind": "2023-05-24T08:15:00",
          "IsVrij": true,
          "AgendaId": 10090
      }
  ],
  "ReturnValue": {
      "ResponseCode": 200,
      "ResponseText": "OK",
      "Melding": "OK",
      "Gelukt": true
  }
}
<?xml version="1.0" encoding="utf-16"?>
<Tetra_Agenda_GetSlotsParameters_Antwoord xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="-1001">
  <CommunicatieStatus>OZB_Communicatie_Status_Verzoek_is_geslaagd</CommunicatieStatus>
  <Perioden>
    <Tetra_Agenda_Periode Id="-1005">
      <Start>2014-07-29T08:00:00</Start>
      <Eind>2014-07-29T10:00:00</Eind>
      <AgendaId>10013</AgendaId>
      <BloktypeId>10052</BloktypeId>
      <Slots>
        <Tetra_Agenda_Slot Id="-1123">
          <Start>2014-07-29T08:00:00</Start>
          <Eind>2014-07-29T08:10:00</Eind>
          <IsVrij>true</IsVrij>
        </Tetra_Agenda_Slot>
        <Tetra_Agenda_Slot Id="-1124">
          <Start>2014-07-29T08:10:00</Start>
          <Eind>2014-07-29T08:20:00</Eind>
          <IsVrij>true</IsVrij>
        </Tetra_Agenda_Slot>
        <Tetra_Agenda_Slot Id="-1125">
          <Start>2014-07-29T08:20:00</Start>
          <Eind>2014-07-29T08:30:00</Eind>
          <IsVrij>true</IsVrij>
        </Tetra_Agenda_Slot>
        ...
      </Slots>
    </Tetra_Agenda_Periode>
    <Tetra_Agenda_Periode Id="-1001">
      <Start>2014-07-29T11:30:00</Start>
      <Eind>2014-07-29T17:00:00</Eind>
      <AgendaId>10013</AgendaId>
      <BloktypeId>10052</BloktypeId>
      <Slots>
        <Tetra_Agenda_Slot Id="-1012">
          <Start>2014-07-29T11:30:00</Start>
          <Eind>2014-07-29T11:40:00</Eind>
          <IsVrij>true</IsVrij>
        </Tetra_Agenda_Slot>
      </Slots>
    </Tetra_Agenda_Periode>
      ...
  </Perioden>
</Tetra_Agenda_GetSlotsParameters_Antwoord>

Booked appointments

It is possible to get an overview of booked appointments for a logged in patient.

More information about this request can be found in “Get appointments for a logged in patient”.

Create appointment

Requirements

To make anonymous appointments work Bricks Huisarts needs one active(!) patient with the with the following data:

Field

Value

Lastname

Afspraak

Category

Nooit factureren

It can take up to 24 hours before this patient is active on the API.

Request (logged in user)

Create appointment (default).

{
  "Name": "{{name}}",
  "Key": "{{key}}",
  "Target": "{{target}}",
  "Session": "{{session}}",
  "Method": "MaakAfspraak",
  "opmerkingen": "Jeuk aan linkerbeen",
  "start": "2023-05-02T08:00:00",
  "eind": "2023-05-02T08:01:00",
  "agendaId": 10013,
  "bevestigingsOpmerking": "Remark for this appointment",
  "opmerkingOvernemenInSoep": false
}

The patientId isn’t added to the request, the patient is “matched” based on the session.

Parameters

  • opmerkingen: Reason for the appointment, typed by the patient

  • start: Start datetime of the appointment

  • eind: End datetime of the appointment

  • agendaId: ID of the agenda that will contain the appointment

  • bevestigingsOpmerking: (Optional) information that will be displayed in the confirmation, do not add private data! This text will replace [bevestigingsopmerking] in the email template.

  • opmerkingOvernemenInSoep: (Optional) Give the user in Bricks Huisarts the option to place the appointment remark (opmerking) on the S-line of the SOEP status.

<Tetra_Agenda_MaakAfspraak_Verzoek xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="-1000">
  <Identificatie xsi:type="OZB_Communicatie_Identificatie_GebruikerSessie" Id="-1001">
    <Sessie>[session token]</Sessie>
  </Identificatie>
  <OntvangerEntiteit>[practice code]</OntvangerEntiteit>
  <PatientId>10263</PatientId>
  <Opmerkingen>Headache</Opmerkingen>
  <Start>2013-04-16T00:20:00</Start>
  <Eind>0001-01-01T00:00:00</Eind>
  <AgendaId>10048</AgendaId>
  <AnoniemePatientId>0</AnoniemePatientId>
</Tetra_Agenda_MaakAfspraak_Verzoek>

Request (anonymous user)

Let Bricks Switchboard try to find the patient when creating the appointment. In case 0 or more then 1 patients are found the appointment is “connected” to the “Afspraak” patient.

{
  "Name": "{{name}}",
  "Key": "{{key}}",
  "Target": "{{target}}",
  "Method": "MaakAfspraak",
  "patientId": -1,
  "opmerkingen": "Jeuk aan linkerbeen",
  "start": "2023-05-02T08:00:00",
  "eind": "2023-05-02T08:01:00",
  "agendaId": 10090,
  "nietMatchen": false,
  "anoniemePatientId": -1,
  "achternaam": null,
  "geboortedatum": "0001-01-01T00:00:00"
  "email": "your@mail.com",
  "bevestigingsOpmerking": "Remark for this appointment"
}
  • When successful, you will receive an appointmentToken, which can be used to cancel the appointment.

  • If patientId is set to -1, an attempt will be made to match the appointment based on name and date of birth, unless nietMatchen = true.

  • If no patient or more than 1 patient is found, the appointment will be booked under the anoniemePatientId.

  • If anonymousPatientId is not provided, the appointment will be booked under a patient named “Afspraak”.

  • If the patient with the name “Afspraak” is also not found, an error will be returned.

When you have the patientID you can create an appointment for the patient without logging in. An example request looks like this:

{
   "Name": "{{name}}",
   "Key": "{{key}}",
   "Target": "{{target}}",
   "Method": "MaakAfspraak",
   "patientId": 157376,
   "opmerkingen": "Jeuk aan linkerbeen",
   "start": "2024-02-21T14:20:00",
   "eind": "2024-02-21T14:30:00",
   "agendaId": 10090,
   "nietMatchen": true,
   "anoniemePatientId": -1
}

Parameters

  • opmerkingen: Reason for the appointment, typed by the patient

  • start: Start datetime of the appointment

  • eind: End datetime of the appointment

  • agendaId: ID of the agenda that will contain the appointment

  • nietMatchen: Match patient to all patients in Bricks Huisarts (true / false)

  • achternaam: Family name of the patient

  • geboortedatum: Date of birth of the patient

  • email: Email address that will receive the confirmation

  • bevestigingsOpmerking: (Optional) information that will be displayed in the confirmation, do not add private data! This text will replace [bevestigingsopmerking] in the email template.

<Tetra_Agenda_MaakAfspraak_Verzoek xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="-1000">
  <Identificatie xsi:type="OZB_Communicatie_Identificatie_Servertoken" Id="-1001">
    <Sessie>[session token]</Sessie>
  </Identificatie>
  <ZenderIP>172.26.4.11</ZenderIP>
  <OntvangerEntiteit>[practice code]</OntvangerEntiteit>
  <PatientId>0</PatientId>
  <PatientNAW Id="-1000">
    <Geslacht>NHG_Geslacht_Man</Geslacht>
    <Geboortedatum>1980-01-01T00:00:00</Geboortedatum>
    <Telefoonnummers />
    <Naam Id="-1000">
      <NaamGebruik>OZB_NietGevuld</NaamGebruik>
      <Eigennaam>johnson</Eigennaam>
    </Naam>
  </PatientNAW>
  <Opmerkingen>Sore throat</Opmerkingen>
  <Start>2015-11-26T09:00:00</Start>
  <Eind>2015-11-26T09:10:00</Eind>
  <AgendaId>10082</AgendaId>
</Tetra_Agenda_MaakAfspraak_Verzoek>

When <PatientID /> contains a zero this means that the appointment will be made for a patient that does not exists in Bricks Huisarts.

Response (failed)

{
    "afspraakId": -1,
    "wisAfspraakToken": null,
    "ReturnValue": {
        "ResponseCode": 500,
        "ResponseText": "Server error",
        "Melding": "Slot is niet beschikbaar",
        "Gelukt": false
    }
}

Response (success)

{
   "afspraakId": 116121,
   "wisAfspraakToken": "01077771_saqn7qscNeg13dsBBBjPvB8K024cd2P49",
   "ReturnValue": {
       "ResponseCode": 200,
       "ResponseText": "OK",
       "Melding": "OK",
       "Gelukt": true
   }
}

wisAfspraakToken starts with the AGB-code of the practice.

<Tetra_Agenda_MaakAfspraak_Antwoord xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="-1001">
  <CommunicatieStatus>OZB_Communicatie_Status_Verzoek_is_geslaagd</CommunicatieStatus>
  <Transactiestatus>OZB_NietGevuld</Transactiestatus>
  <AgendaStatus>OZB_NietGevuld</AgendaStatus>
  <WisToken>12345AAAAAAAA123</WisToken>
  <AfspraakId>147002</AfspraakId>
</Tetra_Agenda_MaakAfspraak_Antwoord>

Delete appointment (by token)

Request (logged in user)

You can use the same request as for the “anonymous user”:

{
  "Name": "{{name}}",
  "Key": "{{key}}",
  "Target": "{{target}}",
  "Method": "WisAfspraakByToken",
  "afspraakToken": "01000000_1HDpMOw6eUI0PTh5Jp6iwUOaStJ2PRlrl7"
}
<Tetra_Agenda_WisAfspraak_Verzoek xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="-1000">
  <Identificatie xsi:type="OZB_Communicatie_Identificatie_GebruikerSessie" Id="-1001">
    <Sessie>[session token]</Sessie>
  </Identificatie>
  <OntvangerEntiteit>[practice code]</OntvangerEntiteit>
  <ObjectId>213769</ObjectId>
</Tetra_Agenda_WisAfspraak_Verzoek>

Request (anonymous user)

Delete appointment when request is based on a token login.

{
  "Name": "{{name}}",
  "Key": "{{key}}",
  "Target": "{{target}}",
  "Method": "WisAfspraakByToken",
  "afspraakToken": "01000000_1HDpMOw6eUI0PTh5Jp6iwUOaStJ2PRlrl7"
}
<Tetra_Agenda_WisAfspraak_Verzoek xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="-1001">
  <Identificatie xsi:type="OZB_Communicatie_Identificatie_Servertoken" Id="-1001">
    <Token>[server token]</Token>
  </Identificatie>
<WisToken>12345AAAAAAAA123</WisToken>
</Tetra_Agenda_WisAfspraak_Verzoek>

Response

{
  "ReturnValue": {
    "ResponseCode": 200,
    "ResponseText": "OK",
    "Melding": "Verwijderd",
    "Gelukt": true
  }
}
<Tetra_Agenda_WisAfspraak_Antwoord xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="-1001">
  <CommunicatieStatus>OZB_Communicatie_Status_Verzoek_is_geslaagd</CommunicatieStatus>
</Tetra_Agenda_WisAfspraak_Antwoord>

Delete appointment (by ID)

Request

{
  "Name": "{{name}}",
  "Key": "{{key}}",
  "Target": "{{target}}",
  "Method": "WisAfspraakById",
  "afspraakId": 12345678
}

Parameters

  • afspraakId: ID of the appointment that needs to be deleted.


Last update: 13-01-2025 14:43