Often the schema of a clinical domain will be a superset of the VMR. For example,  this tutorial considers the situation of a diabetic foot clinic where additional information along with standard observations is recorded in the EHR and presentable through an extended VMR. The VMR extension can be captured in a  Package ( in a similar way to the way we did a Library). Its also possible to import the new extended model as a 'hardwired' internal package.  Another way to customise an extended data model is to use an archetype.

A diabetic clinic exam will look at the things like the ankle brachial index ( a measure of blood flow), the pulses, and abnormalities that may be present. Compile and then save the following as ExtendedDiabeticFoot.gello_model :

    Package ExtendedDiabeticFoot
    class DiabeticFootObservations extends Any
     diabeticFootExamDate: TS
      leftDorsalisPedisPulseFull: Boolean
     rightDorsalisPedisPulseFull: Boolean
     leftPosteriorTibialPulseFull: Boolean
     rightPosteriorTibialPulseFull: Boolean
     leftAnkleBrachialIndex: Real
     rightAnkleBrachialIndex: Real
     anyFootDeformity: Boolean
     anyNeurologicalChanges: Boolean
      anyUlcerPresent: Boolean
    class ExtendedDiabeticFootExample_SinglePatient extends SinglePatient
     diabeticFootObservations: Sequence(DiabeticFootObservations)
    class InfrastructureRoot extends Any
     singlePatient: ExtendedDiabeticFootExample_SinglePatient