Class EMediplanMedicationResolver.NoOpMedicationResolver
java.lang.Object
org.projecthusky.fhir.emed.ch.epr.service.converter.emediplan.EMediplanMedicationResolver.NoOpMedicationResolver
- All Implemented Interfaces:
EMediplanMedicationResolver
- Enclosing interface:
EMediplanMedicationResolver
public static final class EMediplanMedicationResolver.NoOpMedicationResolver
extends Object
implements EMediplanMedicationResolver
Extremely basic medication resolver that only supports free text medication specification. Any other id type than
MedicamentIdType.NONE will result in an UnsupportedOperationException.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.projecthusky.fhir.emed.ch.epr.service.converter.emediplan.EMediplanMedicationResolver
EMediplanMedicationResolver.MedicationNotFoundException, EMediplanMedicationResolver.NoOpMedicationResolver -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMedication(MedicamentIdType idType, String id) Gets a valid FHIR CH EMED EPR Medication resource from the medication
-
Constructor Details
-
NoOpMedicationResolver
public NoOpMedicationResolver()
-
-
Method Details
-
getMedication
public ChEmedEprMedication getMedication(MedicamentIdType idType, String id) throws UnsupportedOperationException, EMediplanMedicationResolver.MedicationNotFoundException Description copied from interface:EMediplanMedicationResolverGets a valid FHIR CH EMED EPR Medication resource from the medication- Specified by:
getMedicationin interfaceEMediplanMedicationResolver- Parameters:
idType- The type of medication id provided with the eMediplan document.id- The value of the medication id provided with the eMediplan document.- Returns:
- A valid FHIR CH EMED EPR Medication resource with the matching medication.
- Throws:
UnsupportedOperationException- if the resolver does not support the received medication id type.EMediplanMedicationResolver.MedicationNotFoundException- if the resolver could not find a match for the received id and id type, despite supporting the received id type.
-