samedi HL7gateway

Version 1.40.0

Changelog

hl7gateway changes

1.40.0 – 2026-10-09

  • After sending a document as MDM^T02, the gateway reports it to samedi, which shows in the medical record overview when the document was last sent.
  • Changing the username or password of a configured samedi account no longer stops the gateway from starting.
  • An ADT message (e.g. A31 or A08) that adds a patient identifier from a configured external_patient_authority_systems entry to a patient whose other data is unchanged now saves that identifier in samedi. Before, it was dropped unless some other patient data changed in the same message.
  • Breaking change: Outgoing MDM messages now send the document creation time in TXA-6 (Origination Date/Time) with seconds and the UTC offset of the gateway’s time zone, in the same format as MSH-7, e.g. 20250715010007+0200 instead of 202507150100. A receiver that expects the old 12-digit value must accept the new format. It was sent to the minute without an offset, and in the time zone Platform reported it in, so a receiver that read it as local time could place a document on the previous day. EVN-2 now carries the UTC offset as well. The “Bezugsdatum” in TXA-4 and OBX-14 uses the same format, as midnight in the gateway’s time zone, e.g. 20250210000000+0100 instead of 20250210.

1.39.0 – 2026-10-06

  • The error a gateway reports to samedi, shown in customer management under third party integrations, no longer contains patient data or text from other systems. It now names only the kind of failure and points to the gateway logs, for example “request rejected as unauthorized (401), see gateway logs for details”; the full error is still written to the gateway logs.
  • A base URL with a path now works with or without its trailing slash. Written without one, as in base_url = "https://host/fhir", requests used to go to https://host/<route> rather than https://host/fhir/<route>, because the last segment of the path was dropped. This applies to fhir.base_url in FHIRGateway, imedone.base_api_endpoint in HL7Gateway and xvianova.base_url in xvianovagateway. An iMedOne endpoint written with a trailing slash also no longer logs in at a path with a doubled slash.
  • The gateway no longer crashes on an ADT^A40 patient merge when neither the PID patient nor the samedi patients being merged have an xref, as is the case for patients created through guest bookings or the patient portal; the merge is now carried out.
  • Patient merges via ADT^A40 now keep the patient matchable for online and VoiceBot booking.
  • The example configuration now documents patient_identity_assigning_authority, the assigning authority (PID-3.4) sent with the samedi patient ID.

1.38.0 – 2026-10-01

  • An incoming SRM^S02/SRM^S03 that changes the appointment status (AIS-10) alongside other fields is now applied to the platform in a single request. The status previously went out as a second, separate request, which made the platform record two appointment audits and send two outgoing SIU^S14 messages for one SRM. The status is now part of the reschedule payload, as attendant_state. A message that changes nothing but the status is still applied.

  • Prometheus metrics can now be served on a local HTTP endpoint. A new [metrics] section turns it on:

    [metrics]
    listen_address = "127.0.0.1:9100"
    

    The metrics are then at http://127.0.0.1:9100/metrics: the gateway’s Go runtime and process metrics — memory, goroutines, CPU, uptime — along with whatever the gateway records itself. Adding a [metrics.tls_config] with a cert_file and a key_file serves HTTPS instead, and require_client_certificate asks the scraper for a certificate of its own. Without a listen_address nothing is served, which stays the default. The endpoint has no authentication of its own, so keep the listen address on loopback unless a scraper elsewhere has to reach it.

  • Outgoing requests now consistently name the gateway and the version it is running in the User-Agent header, for example fhirgateway/2.4.1.

  • Incoming SIU messages now send their ZAM segments to Platform as appointment metadata. Each ZAM becomes one entry with the ZAM-4 text. ZAM-2 sets the role: TITLE, THERAPIST, LOCATION, SERVICE_LONG_NAME or PATIENT_NOTE from https://app.samedi.de/fhir/sid/appointment-metadata, anything else is GENERIC. The entry is patient-visible only for PV from https://app.samedi.de/fhir/sid/audience in ZAM-3, otherwise it stays practice-internal. Each SIU that creates or updates an appointment replaces its whole metadata set, so one without ZAM clears it. A cancellation keeps it.

  • Credentials no longer reach the logs: the Authorization header of a logged request — one a gateway sends, or a webhook request it receives — is now written as [redacted], and FHIRGateway no longer logs the OAuth access token it refreshes.

1.36.0 – 2026-08-26

  • The orgacard_id additional encounter field is now omitted from the encounter association payload when PV1-50 carries no value, instead of being sent as an empty string. Previously an update without PV1-50 cleared a previously stored orgacard_id.

1.35.0 – 2026-08-24

  • Add a mllp.sender.send_pending_status config option to control whether appointment requests are sent with the Pending SCH-25 Filler Status Code.
  • Incoming ADT^A05 (pre-admit patient) messages are now accepted and handled like ADT^A01: the patient is created if it does not exist yet and updated if it does, and the CON-segment invitation control, the automatic_patient_claiming setting and the case data extraction from PV1/PV2 apply as they do for the other accepted ADT messages. Previously an ADT^A05 was rejected with AR and message not supported.

1.34.0 – 2026-08-12

  • Fix outgoing requests hanging on network failures on machines with automatic proxy configuration. Proxy resolution is now bounded so it can no longer outlast the request timeout.
  • Free text that hl7gateway reads from Platform is now stripped of control characters before it is mapped into an outgoing HL7 field, so a control character in the source data never reaches the receiver, not even as a hexadecimal escape. This covers the appointment name, structured comments (NTE), the video consultation link, the patient comment and insurance number, patient demographics in PID, resource names in AIG, the document title and filename in TXA, and the Orbis patient and case IDs that Platform keeps in a structured comment (PID-2, PID-3, PV1-19). The C0 controls (0x00-0x1F), 0x7F and the C1 controls (U+0080-U+009F) are dropped without replacement, so Test \x1a Test is sent as Test Test with two spaces. Dropping the C1 controls also removes U+0085 (next line), which some receivers treat as a line terminator; it previously reached the wire unescaped in every charset, and as a single raw byte under 8859/1 and 8859/15. A line feed is kept and is still sent as \.br\. Free text that is not valid UTF-8 now yields the replacement character U+FFFD in the affected positions. Identifiers, codes and timestamps generated by the gateway are unchanged.
  • Outgoing HL7 messages now encode control characters in field content as the HL7 hexadecimal escape \Xdd\ instead of writing them to the wire raw. This affects the C0 controls (0x00-0x1F) and 0x7F that are not HL7 delimiters, so for example a substitute character (0x1A) in an appointment comment is sent as \X1A\. Because the default mllp.sender.charset_replacement is itself the SUB byte, characters that are not representable in the configured charset are now transmitted as \X1A\ rather than as a raw 0x1A. Carriage return is still stripped as the segment terminator, and the existing escapes (\F\, \S\, \R\, \E\, \T\, \.br\) are unchanged.
  • Outgoing HTTPS requests now negotiate HTTP/2 when the server offers it.
  • Support incoming ORM^O01 messages: they are parsed into PROM orders. Enabled per account with the new orm_enabled config option, which defaults to false.

1.33.3 – 2026-07-14

  • Incoming SIU messages now honour the SCH-25 Filler Status Code. A Pending status creates or updates the appointment as pending (institution participation status needs_action); Booked, Started, Complete, and Noshow create it as confirmed (accepted). Both apply regardless of how the appointment type is configured. Other values (e.g. Waitlist) and an absent SCH-25 leave the participation status to the platform’s default for the appointment type.
  • Outgoing SIU messages now send Pending in SCH-25 when the appointment has a booking status of pending.

1.33.2 – 2026-06-30

  • No user-visible changes.

1.33.1 – 2026-06-19

  • Log more information when patient decryption fails.

1.33.0 – 2026-06-18

  • ADT^A40: A40 no longer creates the target patient as a side effect. When the target patient (PID) is not found in an institution:
    • If the duplicate patient (MRG) is also not found, the message is silently skipped for that institution.
    • If one distinct duplicate patient (MRG) is found, its patient data and identifiers are updated with the data from the PID segment. PID fields take priority; empty PID fields are filled from the existing MRG patient data.
    • If multiple distinct duplicate patients (MRG) are found, they are merged together using the first as the anchor, with PID data applied to the result.
  • When handling incoming HL7-messages, respond with AE errors in case of authentication errors. Also crash the gateway.

1.32.1 – 2026-06-09

  • No user-visible changes.

1.32.0 – 2026-06-08

  • When processing incoming ADT messages (A01, A04, A08, A14, A31) where the patient is identified by samedi ID, reject the message if the patient is not found on the samedi platform
  • Support CON segment in incoming SIU, MDM and SRM messages to trigger patient portal invitations. INV-INITIAL in CON-2 triggers an initial invitation; INV-REINVITE forces a re-invitation regardless of prior invitation status. Mirrors the existing ADT behaviour added in 1.31.0.

1.31.0 – 2026-05-21

  • Add samedi.state_file_format configuration option to choose the state file storage format. Defaults to "json" (unchanged behaviour); set to "bbolt" for an embedded key-value backend that scales better as state grows. The path in state_file is treated as a base name — its extension (if any) is replaced with the chosen format’s extension. Switching formats automatically converts the existing state file on startup, keeping the previous file as <name>.<format>.bak.
  • Support CON segment in incoming ADT messages to trigger patient portal invitations. INV-INITIAL in CON-2 triggers an initial invitation (overrides the automatic_patient_claiming config setting); INV-REINVITE forces a re-invitation regardless of prior invitation status.

1.30.0 – 2026-05-13

  • Add mllp.sender.charset_replacement config option to control how characters that are not representable in the configured charset are handled in outgoing messages. Defaults to the SUB byte ("\x1A"), matching previous behaviour. Set to "" to drop unrepresentable characters, or to any string (e.g. "?") to substitute with that string.

1.29.0 – 2026-05-05

  • hl7_facility now accepts an array of strings (e.g. hl7_facility = ["clinic-a", "all"]), allowing an account to match incoming messages with any of the listed MSH-6 values. A single string is still accepted for backwards compatibility.
  • Add mdm_out_requires_patient_xref config option. When enabled, suppresses outgoing MDM^T02 messages for patients that have no patient xref configured. Defaults to false.
  • Add --instance-name flag to allow installing multiple instances side by side.
  • ADT^A31 messages no longer create patients; they only update the patient if one is already found.
  • Windows services are now installed with delayed auto-start.

1.27.0 – 2026-03-24

  • Fix logging crashing errors when running as a service. They would not be written to the logfile.
  • Skip outgoing MDM^T02 messages for documents received from an external KIS, to avoid re-sending messages that originated externally.

1.26.0 – 2026-03-18

  • Reject incoming messages (SIU, MDM, ADT, SRM) when a PID segment is present but contains no patient data. Sends back an ApplicationReject ACK with a descriptive error.
  • Ship a Debian/Ubuntu package for hl7gateway

1.25.0 – 2026-03-09

  • Always include a PV1 segment in outgoing MDM^T02 messages. Previously, PV1 was only emitted when appointment data was present.

1.24.0 – 2026-03-06

  • Fix mllp.sender.acknowledge_timeout_seconds configuration option; increase default value to 30 seconds.

1.23.0 – 2026-03-03

  • Show more descriptive error on 422 when server responds with formatted error.
  • Truncate HL7 messages in logfiles.

1.22.0 – 2026-01-26

  • Breaking Change: Change how incoming HL7 messages are processed. The gateway now never exits when incoming messages cannot be processed.
    • Reply with AE application error messages for temporary errors like network problems.
    • Reply with AR for permanent errors such as unsupported message types or validation errors
    • Never crash when handling incoming HL7 messages.
  • Configuration mllp.sender.use_public_appointment_id removed as obsolete.
    • We already include both ids in the message (since 1.8.1), patient portal appointment id in SCH-24-1, and appointment id in SCH-2-1 as usual.
    • Existing configurations with this flag will continue to work, but the flag has no effect.
  • Show more descriptive error when encryption key data is missing
  • Sign MSI installer, fix codesigning of executables.
  • Strip samedi: prefix from patient references more consistently.

1.21.0 – 2026-01-08

  • Add hl7gateway.exe to ProgramFiles(x86)% for backwards compatibility when upgrading from versions 1.19 and below.
  • Change code signing certificate

1.20.1 – 2026-01-07

  • Add ability to skip problematic entry, when polling medical record entries. The problematic entry state will be added to the state file with the key medical_records_error

1.20.0 – 2025-12-19

  • Breaking change: Change where hl7gateway.exe is installed. It now lives in %ProgramFiles% instead of "%ProgramFiles(x86)%. To ensure the gateway keeps working uninstall/reinstall the windows service after upgrading.
  • Build system updates.
  • Internal configuration updates.

1.19.0 – 2025-11-28

  • Accept ADT^A14 messages.
  • Properly handle document title (TXA-25) in incoming MDM messages.

1.18.1 – 2025-11-25

  • For invalid appointment messages, reply with an AR rejection now.

1.18.0 – 2025-11-25

  • When appointments in incoming SIU messages are invalid, reply with an AE rejection instead of an error. Send validation errors in the ERR segment.
  • Send patient country in PID-11-6

1.17.1 – 2025-11-11

  • No user-visible changes.

1.17.0 – 2025-11-10

  • Add waitlist name in the AIS-10-4 of SIU messages

1.16.0 – 2025-10-31

  • Enable structured JSON logging with samedi.log_format = "json"
  • When handling SRM^S02 or SRM^S03, and the appointment is unavailable at the requested time, the gateway does not crash anymore. It only sends the rejection message with the error description.

1.15.0 – 2025-10-20

  • Update authentication in IMedOne API client.

1.14.0 – 2025-10-15

  • Add mllp listener option to automatically share documents with patient on every MDM message received (mllp.listener.automatic_document_sharing, default: false)

1.13.0 – 2025-10-02

  • When adding encounter ids to patients through ADT messages, ignore deleted patients. This would cause an error before.
  • Fix an issue where mdm_out_requires_encounter would sometimes not work.

1.12.1 – 2025-09-18

  • Logging changes
    • Service output is no longer logged to the windows event log. It’s only in the logfile now.
    • When run interactively, output to STDERR is now identical to the data that’s written into the logfiles.

1.11.4 – 2025-09-11

  • Add support for form type reference in MDM messages. When generating MDM T02 messages, the system now uses form type reference for the document type (TXA-2) when present, with document request type reference taking precedence if both are available.
  • Change how resource identifiers are received in AIL and AIP segments.
    • In AIL segments, resource identifiers are in AIL-3-10 (Comprehensive Location Identifier)
    • In AIP segments, resource identifiers are in AIP-3-1 (ID Number) and AIP-3-9 (Assigning Authority)
    • Breaking change: Providing any authority value also changes the xref lookup places to AIL-3-1-10-1 and AIP-3-1-1-1.

1.11.3 – 2025-09-10

  • Create a new patient from PID segment when ADT A40 patient merge message is received (applies only for external patients)
  • iMedOne integration: Don’t set patient xref, only write into patient identifiers.

1.11.2 – 2025-09-03

  • When the setting mdm_out_requires_encounter is false but the received document document from samedi is linked to an appointment, send the appointment reference in TXA-14

1.11.1 – 2025-08-27

  • Consider 422 error permanent in the api client, and don’t retry it
  • Internal updates to logging. Some messages might be temporarily logged twice.

1.11.0 – 2025-08-22

  • Always strip leading samedi: from patient identifiers in outgoing HL7 messages.
  • Fix SIU^S12 messages for appointments with forms
  • Require imedone.patient_identifier_system to be configured.

1.10.6 – 2025-08-08

  • Fix ACK messages for successful ADT^A40 patient merge requests

1.10.5 – 2025-07-29

  • No user-visible changes.

1.10.4 – 2025-07-21

  • Crash on error when a received message can’t be processed
  • Fix recognizing appointment id in the PID-3
  • Support diverse gender.

1.10.3 – 2025-07-04

  • Ping platform once a minute, with all accounts even polling is turned off, just to keep connection active

1.10.2 – 2025-06-30

  • Added error tracking in the statefile. When synchronization of a specific patient, appointment, or medical record entry fails, the corresponding index will be recorded in hl7gateway-state.json with an _error suffix.
  • Change how resource identifiers are sent in AIL and AIP segments.
    • In AIL segments, resource identifiers are in AIL-3-10 (Comprehensive Location Identifier)
    • In AIP segments, resource identifiers are in AIP-3-1 (ID Number) and AIP-3-9 (Assigning Authority)
    • The default namespace for samedi resource identifiers is 99SAMEDI-RESOURCE&https://app.samedi.de/fhir/sid/calendar-resource-id&URI

1.10.1 – 2025-06-19

  • Fix order of resource segments in SIU messages.
  • If mllp.listener.automatic_patient_claiming is true, create a patient invite on every ADT message

1.10.0 – 2025-06-11

  • Add resource_types mapping to the configuration. With this user can specify the type of resource for resource xrefs.
  • Breaking change: Replace ADT^A23 with ADT^A29 for patient deletion messages to better comply with HL7 standards
  • Depending on resource_types configuration we will send AIL and AIP segments in SIU message for corresponding resources. For the resources with unspecified type we continue sending AIG.

1.9.4 – 2025-06-11

  • Add enhanced encounter data extraction from ADT messages. This allows extracting of:
    • Patient class extracted from PV1-2
    • Location extracted from PV1-3
    • Admission date extracted from PV1-44
    • Discharge date extracted from PV1-45
    • Planned discharge date extracted from PV1-46
    • Alternate visit ID (orgacard-specific) extracted from PV1-50

1.9.3 – 2025-06-03

  • Accept incoming SIU^S23 messages.
  • Add mimetype to only OBX-5-2 field on outgoing MDM messages
  • Change PID-13 field formatting:
    • For email, send email in PID-13-4 and “NET” in PID-13-3.
    • For phone numbers, add unformatted phone number in PID-13-12.
  • Fix sometimes missing TXA-25 field
  • Send document request type xref in MDM message at TXA-2. When document request type xref is emtpy, we send the default value there: samediDefaultType

1.9.2 – 2025-05-20

  • No user-visible changes.

1.9.1 – 2025-05-20

  • Add mimetype to OBX-5-2 and OBX-5-3 fields on outgoing MDM messages
  • Fix patient lookup when receiving an MDM message on multi account setups
  • Send the access link of VC appointments in SIU messages.

1.9.0 – 2025-04-08

  • Don’t send MDM messages when the flag mllp.sender.mdm_out_requires_encounter is set to true and the appointment does not have an encounter reference.
  • Make sure statefile is always written atomically.
  • Use enhanced acknowlege mode and always send AL/NE in MSH-15/MSH-16.

1.8.2 – 2025-03-31

  • No user-visible changes.

1.8.1 – 2025-03-25

  • Send patient portal appointment id (from the portal API) in SCH-24.

1.8.0 – 2025-03-24

  • Add encounter reference to PV1-19 for outgoing SIU messages, if it is available
  • Make iMedOne integration independent from the appointments_polling_enabled configuration option.
  • Send the “Bezugsdatum” of patient documents in TXA-4 and OBX-14 segments of outgoing MDM messages.

1.7.7 – 2025-03-17

  • Configuration mllp.sender.use_public_appointment_id. When set to true, we’ll send patient portal appointment id as a filler id in SCH segment. Default is false

1.7.6 – 2025-03-13

  • Fix MLLP timeout logic: only start the timeout when the message is sent. This fixes a problem with timeouts when sending very large MDM messages.
  • Fix parsing SIU messages without PID but with AIS segments.

1.7.5 – 2025-02-27

  • Auto-discover HTTP proxy settings on Windows and MacOS
  • Do not strip debug symbols from release builds
  • Support patient identifiers of the type urn:uuid:<uuid> (maps to 1234^^^&<uuid>&UUID in HL& patient identifiers)

1.7.4 – 2025-02-12

  • Configuration mappings.external_patient_authority_systems for holding recognized patient identifier authorities and corresponding identifier systems
  • Configuration mappings to store all kinds of configured mappings
  • Handle ADT_A40 patient merge message, new mllp listener configuration value called patient_merge_adt_a40_enabled is available to turn this feature on (disabled by default)
  • Recognize hl7 patient external identifiers according to configured mappings.external_patient_authority_systems and send them to platform. Before we recognized only those with universal id “ISO”
  • Send patient external identifiers in PID-3

1.7.3 – 2025-01-24

  • No user-visible changes.

1.7.2 – 2025-01-20

  • Associate encounter with patient in ADT handler
  • Option value patient_merge_adt_a40_enabled to toggle handling patient merge with ADT_A40 message, defaults to false
  • Populate TXA-14 field on outgoing MDM messages if appointment reference is available.
  • Send MDM messages for institutions with the antivirus package active only when they were scanned and the scan passed.
  • Upgrade dependencies

1.7.1 – 2024-12-10

  • Upgrade dependencies

1.7.0 – 2024-12-04

  • Breaking changes
    • Outgoing SIU messages now reflect the appointment status more directly.
      • SCH-25 previously was only Booked or Deleted. Now it can be any Filler Status Code. (Table 0278)
    • When parsing PID segments, samedi patient ids are only recognized when assigning authority is &www.samedi.de&DNS. The Universal ID Type DNS used to be optional and is now required.
    • SIU messages that contain a samedi appointment ID in the SCH segment (an id in the configured samedi.appointments_namespace) are rejected with an AE error unless they contain an account ID in PV1-19.
  • Support for associating appointments with cases through incoming ADT messages. When an ADT message has an appointment ID in PID-3, the PV1-19 visit number will be associated with that appointment.
  • Support for incoming ADT^A31 messages.
  • Support for PV1-19 in incoming SIU messages.

1.6.1 – 2024-11-12

  • No user-visible changes.

1.6.0 – 2024-10-24

  • Upgrade dependencies

1.5.0 – 2024-10-18

  • Set PV1-2 segment to U for MDM messages
  • When syncing, sync all resource types (patients, appointments, etc) in parallel, not sequentially

1.4.0 – 2024-09-28

  • Send multiple values for a single comment field outgoing SIU message NTE segments as repetition. (separated by ~) Previously, multi-selections would be separated by commas.

1.3.0 – 2024-09-19

  • Query patients by their identifiers before posting new appointments from incoming SIU^S12

1.2.6 – 2024-07-30

  • On startup, log all mapped resource xrefs

1.2.5 – 2024-07-17

  • Fix a crash when processing SRM messages where the referenced patient did not have an xref

1.2.4 – 2024-07-15

  • No user-visible changes.

1.2.3 – 2024-07-15

  • Change logging of incoming HL7 messages to make it easier to understand.

1.2.2 – 2024-07-03

  • Fix logging of incoming HL7 messages with non-UTF-8 encoding

1.2.1 – 2024-06-12

  • Improve logging of incoming and outgoing messages
  • Upgrade dependencies

1.2.0 – 2024-04-24

  • Change in build tooling. No changes for end users

1.1.0 – 2024-04-15

  • Add support for mTLS incoming and outgoing connections in HL7Gateway

1.0.8 – 2024-03-18

  • Fix an issue where sending MDM messages for clinic-uploaded files would not work.

1.0.6 – 2024-03-11

  • Fix an issue where a patient wasn’t updated from an ADT message when only the xref has changed.

1.0.3 – 2024-02-19

  • Drop PV1 segments without comments on MLLP messages
  • Support TLS over MLLP with new config options

1.0.2 – 2024-01-16

  • Remove hl7send.exe and hl7listener.exe debugging tools from MSI installer, as those created false alerts in several virus scanners

1.0.1 – 2023-10-26

  • Handle NTE segments in incoming SIU messages

1.0.0 – 2023-10-16

  • Add support for updating waitlist status via SRM messages (via setting AIS.10)
  • BREAKING CHANGE: SIU^S13: correctly mark RGS / AIG segments as removed, added or unchanged (before, we removed all blocks, then re-added them again)
  • Outgoing SIU messages contain AIS.10 with the appointment waitlist status
  • Update code signing certificate

0.36.0 – 2023-08-04

  • Accept multiple values for a single comment field in incoming SRM messages
  • Add option to define whether an encounter is required for MDM-Out (defaults to true)
  • Remove support for apomondo adapter (project ended)
  • Remove support for DIM-Client (project ended)

0.35.0 – 2023-06-20

  • When updating patient data, keep additional patient attributes intact

0.34.0 – 2023-05-22

  • When generating SIU messages, only send messages when they have least one AIG segment.
  • Make logged HL7 messages more readable with newlines

0.33.0 – 2023-05-08

  • When sending SRM messages, include TXA-12 and TXA-16.

0.32.0 – 2023-05-02

  • When handling SRM messages, set or update patient xref when needed.

0.31.0 – 2023-03-27

  • Only send MDM messages when documents have a case ID

0.30.0 – 2023-03-14

  • Accept PV1-19 as encounter information

0.29.0 – 2023-03-09

  • Changes in some API integrations

0.28.1 – 2023-02-13

  • Fix an issue where PID messages would include an empty public identifier in some cases

0.28.0 – 2022-12-18

  • HL7 Acknowledgements (MSA messages), now echo SendingFacility, ReceivingFacility, SendingApplication, ReceivingApplication (MSH-3, MSH-4, MSH-5, MSH-6) from the received message, not from the configuration.
  • Implement routing of HL7-messages based on receiving facility. (MSH-6)
    • When samedi.accounts.{account-name}.hl7_facility is set to some value, incoming HL7 messages will be routed only to accounts when the value in MSH-6 matches the configured value.
    • Messages that cannot be routed to any account will be rejected.

0.27.0 – 2022-12-06

  • DIM client: add new vaccines added in DIM release 2.11:
    • Spikevax bivalent Original/Omicron BA.1 (“Spikevax 0 (Zero)/O (Omicron)” is still accepted)
    • Spikevax bivalent Original/Omicron BA.4-5
    • Jcovden (“janssen” is still accepted")
    • VidPrevtyn Beta
    • Valneva

0.26.6 – 2022-12-01

  • No user-visible changes.

0.26.5 – 2022-11-24

  • No user-visible changes.

0.26.4 – 2022-11-07

  • No user-visible changes.

0.26.3 – 2022-11-03

  • No user-visible changes.

0.26.0 – 2022-11-01

  • Introduce request_timeout_seconds configuration option.
  • Upgrade dependencies

0.25.0 – 2022-09-26

  • DIM client: add support for new BA.4-5 (“Omicron”) vaccines:
    • Comirnaty Original/Omicron BA.4-5

0.24.0 – 2022-09-12

  • DIM client: add support for new BA.1 (“Omicron”) vaccines:
    • Comirnaty Original/Omicron BA.1
    • Spikevax 0 (Zero)/O (Omicron)

0.23.4 – 2022-08-30

  • Improve error logging

0.23.3 – 2022-06-10

  • Fix an error on https://hl7gateway.samedi.de/hl7gateway/messages/mdm/, PID-3 is required, not PID-4.

0.23.2 – 2022-05-19

  • No user-visible changes.

0.23.1 – 2022-05-18

  • Minor changes in log output formatting

0.23.0 – 2022-04-25

  • DIM client: remove stiko_* fields which are deprecated since DIM release 2.6

0.22.4 – 2022-03-28

  • No user-visible changes.

0.22.2 – 2022-01-13

  • Fix an issue where patient birthdates were sometimes not parsed correctly.
  • Fix an issue where the windows service would not be restarted correctly on failure.

0.22.0 – 2022-01-11

  • Changed how error reporting works. Errors are now reported to a samedi-hosted Sentry (sentry.io) instance.
    • This can be disabled by setting the SENTRY_DSN environment variable to an empty string or to your own endpoint.
  • Example config file is now located in data directory instead of install directory.

0.21.0 – 2021-12-09

  • Support writing chunked medical record attachments from incoming MDM messages.

0.20.14 – 2021-11-30

  • Support reading chunked medical record attachments. HL7 is now compatible with streamed MRE uploads on platform.

0.20.11 – 2021-11-25

  • Update the way medical record attachments are fetched from samedi for MDM messages

0.20.8 – 2021-10-13

  • Fix loading Form data for DIM reporting client
  • Normalize vacc_product for DIM reporting

0.20.7 – 2021-10-04

  • No user-visible changes.

0.20.1 – 2021-08-24

  • Handle ADT^A01 and ADT^A04 messages.

0.20.0 – 2021-08-03

  • Add dim-client releases

0.19.3 – 2021-06-29

  • Stop shipping zoneinfo.zip because it is no longer required.
  • Upgrades of internal dependencies.

0.19.2 – 2021-01-20

  • Fix an issue where MDM messages would use the wrong key to encrypt files

0.19.1 – 2021-01-04

  • pretty-print JSON in hl7gateway-state.json

0.19.0 – 2020-12-15

  • Changed RSA key handling in the samedi API
  • hl7_version in the configuration is no longer ignored.
  • MSA message replies now echo the HL7-version (MSH-11) of the incoming message.

0.18.3 – 2020-10-13

  • Strip linefeeds (\r) from message contents.

0.18.2 – 2020-08-24

  • Make sure to handle incoming messages serially for each listener to avoid race conditions with messages for the same appointment sent through different connections at the same time.

0.18.1 – 2020-05-14

  • Fall back to reading patient ids from PID-2 when PID-3 does not have data.

0.18.0 – 2020-05-07

  • Introduce new configuration option log_file_backups. (default: 3)
  • Make samedi API calls robust against IDs being strings vs. numbers.

0.17.4 – 2020-01-07

  • Support notifications for cancellations through SRM^S04 and SRM^S05 messages

0.17.3 – 2019-12-19

  • Support sending notifications in SRM without a PID segment when updating existing appointments.

0.17.2 – 2019-12-16

0.17.0 – 2019-11-29

  • Fix hl7_facility for outgoing HL7 messages. When hl7_facility is configured for a samedi account, it will now correctly be sent in MSH-4 (default is samedi)
  • Include ERR segment for ACK messages on ApplicationError and ApplicationReject
  • Support for sending notifications when creating or updating appointments with notify^true in AIS-12
  • Use \r\n line endings when logging on windows

0.16.1 – 2019-10-22

  • Support incoming SRM^S04 and SRM^S05 messages (appointment cancellation)

0.16.0 – 2019-10-15

  • Send MDM^T02 messages for medical record entries that are created in samedi for patients
    • added a new configuration option medical_record_polling_enabled to enable this per samedi account.

0.15.0 – 2019-09-09

  • Support for incoming MDM^T02 messages.

0.14.0 – 2019-08-07

  • Support for configuring receiving_application and receiving_facility (MSH-5, MSH-6) per connection for outgoing HL7 messages.

0.13.7 – 2019-06-20

  • FIXED: patients where zip, phone numbers or insurance number encrypted as integers would crash the gateway.

0.13.6 – 2019-06-03

  • FIXED: patients with “insurance_company” set to “public” or “private” would break during ADT message handling.
  • Use 99SAMEDI-RESOURCE instead of SAMEDI-RESOURCE in AIG-3-3 to not generate invalid HL7 messages. SAMEDI-RESOURCE is still accepted in incoming AIG/AIL/AIP segments.

0.13.5 – 2019-05-21

  • Support AIP/AIL/AIG segments in SRM messages: When updating an existing appointment in samedi with an SRM message, it’s now possible to override the booking logic by sending appropriate resource segments. This updates the booked resources on that appointment to be exactly as sent.

0.13.4 – 2019-05-20

  • Add a configuration option mllp.sender.peer_error_handling = "ignore". If set, the program will not terminate when it receives a MSA message with AE or CE status and the message will not be retried.

0.13.3 – 2019-05-15

  • hl7gateway instances now periodically announce their status when running normally.

0.13.2 – 2019-05-14

  • Add a Start Menu shortcut for program and configuration directories.
  • FIXED: logging to the windows event log didn’t work.
  • FIXED: multiple incoming connections on the same channel work now.
  • FIXED: service restart would sometimes not work when there were network errors during program initialization.
  • Moved default configuration into non-roaming %ProgramData%.

0.13.1 – 2019-05-02

  • Change parsing of incoming AIG/AIL/AIP segments.
    • AIG-3-1 can now describe a samedi Resource ID. For this AIG-3-3 must have the value SAMEDI-RESOURCE
    • If AIG-3-4 is set, it will be interpreted as samedi resource xref. This will always take precedence over AIG-3-1. (the same applies to AIL and AIP segments)
    • Accordingly, in outgoing SIU messages, AIG-3-3 is now set to SAMEDI-RESOURCE to indicate that AIG-3-1 is a resource ID, not a resource xref
  • Note: existing integrations that send SIU messages to samedi with AIG-3-4, AIL-3-4 or AIP-3-4 need to be updated to keep this field empty or to have an actual resource xref there (this field was previously ignored).
  • Save access token in the state file by account name instead of user name

0.13.0 – 2019-04-29

  • hl7gateway instances now use an access token to authenticate themselves with app.samedi.de

0.12.9 – 2019-04-17

  • Duration is calculated differently for appointment types that are configured with negative start offsets
  • Moved the public website to repo.samedi.de/hl7gateway

0.12.6 – 2019-04-05

  • FIXED: do not send patients birthdate in outgoing PID segments when it is before the year 1900.
  • FIXED: when an xref was used in different resources across multiple samedi accounts it would only be associated with a single account.
  • Remove dump_dir configuration option to write HL7 messages to a directory. Use samedi.log_file to log messages.
  • Support multiple independent MLLP connections.

0.12.5 – 2019-04-02

  • Skip patient birthdate in PID, when the year is less than 1900

0.12.4 – 2019-03-26

  • Use “.br” escape sequence instead of newlines when sending messages to KIS

0.12.3 – 2019-03-21

  • Do not attempt to book appointments into ressources that are shared from another account.

0.12.2 – 2019-03-20

  • Add samedi.log_file configuration option.

0.12.1 – 2019-03-06

  • Support more fields in SRM-S02 messages:
    • Allow ignoring availability calculations when updating appointments with force^yes in APR-5.
    • Support updating appointment duration with ARQ-9/ARQ-10.

0.12.0 – 2019-02-26

  • Don’t send U+200C characters in NTE fields of appointment comments.
  • Make UTF-8 the default MLLP message encoding for new installations
  • Support incoming SRM^S02 messages for updating appointments in samedi.

0.11.0 – 2019-02-05

  • FIXED: SIU messages now always contain at least one RGS segment.
  • outgoing SIU messages now send AIG||X segments inside an RGS||X group for each unchanged resource in an appointment.
  • Use MSH-9-1 and MSH-9-2 exclusively for recognizing messages. Stop using MSH-9-3 (Message Structure)
    • SIU-Messages now don’t need to include SUI_S12 in MSH-9-3 any more.
    • Only S12 - S15 messages are now handled. Older versions would silently accept other types of SIU-Messages.

0.10.4 – 2019-01-15

  • FIX: listen for shutdown signal even while syncing is not yet finished
  • Send recreate_if_exists parameter for events when creating them. When gateway sends a request to create an event, in case the event with such xref already exists, platform will cancel it and create a new event with that xref.

0.10.3 – 2018-11-20

  • FIX: put outgoing appointment namespace in SCH-2-2 as described, not SCH-2(2)-1

0.10.2 – 2018-11-20

  • Add a configuration option patients_polling_enabled to disable sending of ADT messages
  • Add a configuration option appointments_polling_enabled to disable sending SIU messages
  • deprecated polling_enabled configuration option, which now disables outgoing ADT and SIU messages.

0.10.1 – 2018-11-15

  • Add a configuration option “appointments_namespace” to “samedi” section. When present, this will be put to SCH-2-2 of outgoing SIU messages.

0.10.0 – 2018-11-06

  • Drop support for service installation in Unix/macOS.
  • Make windows service handling more robust:
    • Add a command line option “workingDirectory” to make relative paths in configuration work. (they would be relative to “%WINDIR%/System32” before)
    • Log errors during startup to Windows EventLog.
    • Configure automatic restart of the service during installation.
  • MLLP: don’t attempt to connect automatically during startup. Connect when the first message needs to be sent.

0.9.0 – 2018-11-02

  • retry network requests to make the program more robust
  • Support “enhanced mode” for Acknowledgements, allow outgoing messages to be acknowledged with CA/CR/CE codes in addition to AA/AR/AE.

0.8.3 – 2018-10-30

  • Include hl7 specification and changelog

0.8.2 – 2018-10-26

  • Fix merging of non-existent patient by id but by xref

0.8.0 – 2018-10-18

  • when updating patient after ADT message from KIS do not erase any data in samedi patient record

0.7.0 – 2018-10-02

  • do not re-update patients in samedi if the data did not change in order to prevent loops
  • poll for patient updates in samedi and send out ADT Messages
    • ADT^A08 for patients that are created/updated
    • ADT^A23 messages for patients that are deleted

0.6.0 – 2018-09-20

  • accept local phone number on PID-13
  • accept ADT^A08 Message type and allow patients to be created and updated

0.5.7 – 2018-09-10

  • fix born_on parsing

0.5.6 – 2018-06-07

  • Add release build for macOS

0.5.5 – 2018-05-03

  • Support PID fields in SIU messages.

0.5.0 – 2018-04-10

  • Appintment updates now send all resource changes, not the current state of the appointments.
    • A moved appointment will have an RGS||D part with removed resources and an RGS||A part with added resources.
    • Cancelled appointments now send AIG||D segments for the booked resources.
    • Segment IDs in AIG-1 and RGS-1 now increment instead of always being 1.
  • Require the ‘hl7gateway’ package in all connected samedi accounts.
  • Send “DELETED” instead of “BOOKED” in SCH-6 field for S15 messages.

0.4.14 – 2018-03-19

  • Add HTTP[S]_PROXY support. Use the proxy server given in the HTTPS_PROXY or HTTP_PROXY environment variable.

0.4.13 – 2018-03-16

  • Add hl7send tool for sending single messages from text files.

0.4.12 – 2018-03-14

  • send patient address in PID-11 (street, city, zip)
  • send patient email address in PID-13 (type X.400)
  • send patient phone numbers in PID-13 (PC: mobile number, PH: phone, PX: fax)

0.4.11 – 2018-03-06

  • Build a distributable linux archive on CI

0.4.10 – 2018-02-23

  • Make HL7 message IDs non-deterministic.

0.4.9 – 2018-02-23

  • Make timeout configurable with config.mllp.sender.acknowledge_timeout_seconds configuration option.
  • Only start acknowledgement timeout when HL7 message is about to be sent and never run multiple timeouts in parallel.

0.4.8 – 2018-02-22

  • Increase timeout when waiting for HL7 message acknowledgements to 30 seconds. (from 10 seconds)
  • Load practice encryption keys immediately on startup, not only when required.

0.4.7 – 2018-02-16

  • fixed: patients from referrals that are encrypted with a public key are decrypted correctly now.

0.4.6 – 2018-02-12

  • data that can’t be represented with the chosen HL7 message encoding will have non-encodable bytes replaced with a replacement character. (0x1A for ISO 8859-1) Before, the HL7 component would be skipped entirely.

0.4.5 – 2018-02-08

  • installer: Create a batch file in “%APPDATA%/samedi HL7gateway” for a better first-run experience.
  • installer: Ship util/hl7listener.exe for easier debugging.

0.4.4 – 2018-02-07

  • allow setting structured MSH message headers in configuration file
  • always set RGS-2 in outgoing SIU-messages (segment action code)
  • DEPRECATION: consumers should use TQ1-7 and TQ1-13 instead of SCH-11 and SCH-9
  • send TQ1 segments for appointment time
  • SIU-Messages always send message structure SIU_S12

0.4.3 – 2018-02-05

  • bundle zoneinfo.zip in windows installer so that loading timezones works there
  • don’t generate NTE segments for empty appointment comments
  • send gender in PID messages

0.4.2 – 2018-02-05

  • fix that invalid birthdates would get sent as “00010101” in PID segments
  • fix parsing of patient data where birthdate is a timestamp

0.4.1 – 2018-02-02

  • send “Deleted” in SCH-25 for deleted appointments

0.4.0 – 2018-02-02

  • configurable sync interval (set with config.samedi.polling_interval_seconds = 60)
  • HL7 message segments are separated by CR (\r) instead of LF (\n) for conformance with the HL7 specification.
  • new option to disable outgoing HL7 messages per samedi account polling_enabled = false
  • report an error when config file contains unknown configuration options
  • Send out S12/S13/S14/S15 messages, compatible with java HL7gateway with the following differences:
    • HL7 Version declared in MSH header defaults to 2.5
    • MSH sending facility is different. “HL7Gateway^samedi.de^DNS|scheduling^samedi.de^DNS” now is “samedi-hl7gateway|samedi”
    • Comment field names are sent as-is. Existing mappings do not work any more.
    • Charset defaults to “8859/1” and is always sent in all messages.
    • Add three utility scripts
      • “service-install-hl7gateway.bat”, “service-uninstall-hl7gateway.bat” for installing and removing the service (run as Administrator)
      • “utils/tail-service-log.ps1” to more easily look at log output of the running service.
  • wait for ACK/NACK replies when sending out SIU messages

0.3.1 – 2018-01-16

  • better debug output: log HTTP response body for failed requests.

0.3.0 – 2018-01-03

  • read samedi practice ID from incoming SIU S14 messages if one is set. This makes hl7gateway work with multiple configured accounts when updating appointments is required.
  • Remember which samedi appointments have already been imported. (With new samedi.state_file configuration option, which defaults to hl7gateway-state.json in the current directory.)

0.2.6 – 2017-12-11

  • Handle SIU S14 messages from Orbis and put Orbis Case-ID and Patient ID into samedi appointment comments.

0.2.5 – 2017-12-08

  • parse appointment time out of SIU messages when there are no TQ1 segments.

0.2.3 – 2017-12-01

  • Don’t exit program when an incoming HL7 messages can not be assigned to any configured samedi account.

0.2.2 – 2017-11-30

  • Fixed: upgrading with the MSI installer uninstalls old version.
  • Handle AIP/AIL/AIG segments in SIU messages.
  • Send NACK replies for messages that can’t be handled.

0.2.1 – 2017-11-24

  • Fixed: make disabling outgoing HL7 connections actually work.
  • Fixed: SIU messages with appointment times in TQ1 are parsed correctly now.
  • New dump_dir configuration option to log all HL7 messages into files.

0.2.0 – 2017-11-23

  • Ability to run as a windows service.
  • Add windows installer.

0.0.1 – 2017-11-16

  • initial version