EDI
EDI (Electronic Data Interchange) in the Norwegian health sector, refers to a particular set of email servers and the protocols to use them. The EbXml standard uses EDI for the transport itself. The limitations of email also apply to EDI.
Size Limit
The entire EDI message, including the SMTP envelope, can be at most 51 200 000 bytes - about 50 MB. The MIME payload is base64-encoded, meaning it consumes about 133% of the original size. In addition, the EbXml envelope takes up some space. This leaves the effective upper limit of the payload size to be 35 MB, which is enforced in the EDI 2.0 API endpoint for posting a message.
This payload size limit may easily be reached by messages with embedded attachments. To circumvent this, one strategy is to instead embed a reference to a file stored in a object store. NHN is developing a solution to enable this process called DEFT (developer portal page). Please be aware that the message receiver must also have implemented support for file reference for this approach to be viable.
Domain Cross-Over
To avoid contamination between test and production environments, sending EDI messages (emails) between test and production environments are not permitted. EDI addresses with the domain @edi.nhn.no is for production data, and is routed on Helsenettet. EDI addresses with the domain @testedi.nhn.no is for test data, and is routed on the health network Helsenettet. EDI addresses with the domain @samsvar.nhn.no is for test data, but is routed on the (public) internet. This address domain has been specifically whitelisted to be allowed some traffic from the open internet to enter mailboxes for testedi-accounts.
All other domains are in principle disallowed, but for historic reasons there are a few exceptions. EDI 2.0 allows sending over EDI to a communcation party with any of these exception-domains. If the EDI 2.0 message handler is instructed to send a new message to a communication party using traditional EDI, and whose EDI address does not match the list of permitted domains, the API request will "fail early" and give a 400-response.
Domains permitted in production:
@edi.nhn.no@test-es.nav.no@es.nav.no@es.trygdeetaten.no@stsh.no@edi.helsenord.no@edi.ihelse.net@edi.#.nhn.no(The # denotes a wildcard)
Domains permitted in test:
@testedi.nhn.no@samsvar.nhn.no@test-es.nav.no