Skip to content

e-prescription source data

The e-prescription data is created in accordance with the CHMED16A-prescription specification and stored as a json string.

The current specification is available here: https://github.com/ig-emediplan/specification/tree/7ca4661a86168872d03a35e66f01304488e3e8cc/chmed16a

json
{
  "Patient": {
    "FName": "Hans",
    "LName": "Muster",
    "BDt": "1977-11-11"	
  },
  "Medicaments": [
    {
      "Id": "7680517950406",
      "IdType": 2
    }
],
  "MedType": 3,
  "Id": "ad6d758b-99ef-191f-9d81-6e8867ca9d5a",
  "Auth": "7601000778789",
  "Dt": "2023-06-28T11:08:49+02:00"
}

TIP

A json schema is provided under the downloads section to validate the generated eprescription json from your application.

Once the json is complete, compress the json-string using base64 GZip compression algorithm.

shellscript
H4sIAAAAAAAAAzWPMU/DMBCFZ/IrolvB0p3b+O6yUSEEEkUM3RCDW7uiQyNE3AFV+e84diN5ed/ze093bdoWPnw6xSFB316zzOD53Z9jlvDihxEeKnxb4PYypvi74M3THARSZkOUH9xlY5pd2MZwOuTUkMb857ME6kQ2X8OcYyfYEWuHa3S3zmLu/n7mNVvI1HwthTe+Krp2+OACd7I3qvFoSOloNAgZF0UcH7yGzpdqeLyk77qKhIjMwqLVqmdYtCuDzljZEfUo/Vrv0faI0Ez/cZpKMywBAAA=

TIP

Rapid prototyping using the online tool: https://www.multiutil.com/text-to-gzip-compress/

For *nix systems, this command can be used for local processing: gzip -c erx_json.txt | base64 | sed -e 's/^/CHMED16A1/' > erx_gz.txt

The prefix "CHMED16A1" is added before the gzipped output. The string is now ready to be transferred to the erxProxy.

shellscript
CHMED16A1H4sIAAAAAAAAAzWPMU/DMBCFZ/IrolvB0p3b+O6yUSEEEkUM3RCDW7uiQyNE3AFV+e84diN5ed/ze093bdoWPnw6xSFB316zzOD53Z9jlvDihxEeKnxb4PYypvi74M3THARSZkOUH9xlY5pd2MZwOuTUkMb857ME6kQ2X8OcYyfYEWuHa3S3zmLu/n7mNVvI1HwthTe+Krp2+OACd7I3qvFoSOloNAgZF0UcH7yGzpdqeLyk77qKhIjMwqLVqmdYtCuDzljZEfUo/Vrv0faI0Ez/cZpKMywBAAA=

See Examples for information on how to initiate the signature process.

version 1.0.0