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:
- Add a
batches array of BatchType to ProductResource.
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.