[…] notice how the signatories are now the institution and the doctor. This means that the medicine contract can only be created with consent from both the institution (given through the DoctorRole) and the doctor (given by exercising the CreateMeds choice), setting a clear workflow.
Matheus’ application of DAML entitlements and signatory structures for workflow compliance and safety checks are a great application of the technology to the problem space of medical safety. One could imagine barcode ID matching to work within DAML contracts to ensure the right medicine is being delivered in the right dose to the right patient.