Skip to content

Add support for batches and expiry dates to ProductResource #63

Description

@cookeac

The ProductResource has a lot of information about a product, but it currently does not have batch or expiry information.
Operations and components integrate ProductResource directly, so there is not an obvious place to add this information.

Proposal:

  1. Add a batches array of BatchType to ProductResource.
  2. BatchType would contain identifier (batch identifier) and expiryDate (datetime). ICAR has an equivalent in their icarMedicineBatchType (https://github.com/adewg/ICAR/blob/ADE-1/types/icarMedicineBatchType.json).

Some people may prefer that static data about a product and uses of a product instance are not mixed. If this is a concern, there would be two ways of addressing this:

  • Replace uses of ProductResource within operations and mixes with ProductInstanceType, which would contain the batch information and allOf ProductResource or
  • Create a ProductSpecificationResource to hold the static data about a product, and modify ProductResource to be allOf ProductSpecificationResource and the batch data.

These two approaches are very similar. The second one is less likely to cause any breaking changes for generated code for handling work records, operations, and mixes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions