Cureatr can accept encrypted HL7 ADT batch files uploaded via sftp to our dropbox server. Cureatr has two dropbox servers, playdrop.play.aws.cureatr.com
is our internal staging (play) environment and dropbox.live.aws.cureatr.com
is our production (live) environment.
Cureatr will need an ssh public key file for each of these environments to provision sftp accounts for an institution, and will provide the sftp login username to the institution.
Each HL7 file should contain one or more ADT message separated by newline \n
and with each segment within the message separated by carriage return \r
. The file should be encrypted and BASE64 encoded using OpenSSL:
openssl enc -aes-256-cbc -a -in <hl7-file> -out <hl7-file-enc>
A strong encryption password should be used (one for the play environment and a different one for live). Both of these passwords will need to be provided to Cureatr. Strong random passwords can be generated using openssl itself:
$ openssl rand -base64 48
C5kw4fjAIXX9AR6kg167E4cyrDQ3/0AfpvuhG6N0Z2U4nHk71zaCSG90GLhZAKyq
Files should be uploaded periodically on an agreed upon schedule (e.g. every half hour). Each file should contain all the ADT messages since the previous file upload.
Uploaded files should be named consistently and in a manner that allows sorting so they can be processed in order (e.g. the name could contain a timestamp such as YYYYMMDDHHMM or a continually incrementing number). Files should have a consistent suffix (e.g. .txt)
When a file is uploaded, it should be uploaded to a temporary file with a different filename suffix (e.g. .tmp) - once the sftp transfer completes, the remote file should be renamed with the proper suffix. This allows Cureatr to avoid processing a partial file that is in the process of being uploaded. An example interactive sftp session might look like this:
$ sftp [email protected]
Connected to dropbox.live.aws.cureatr.com.
sftp> put 201312181330.txt 201312181330.txt.tmp
Uploading 201312181330.txt to /home/iid/201312181330.txt.tmp
201312181330.txt 100% 542 0.5KB/s 00:00
sftp> rename 201312181330.txt.tmp 201312181330.txt