use of org.openmrs.module.idgen.IdentifierSource in project openmrs-module-mirebalais by PIH.
the class MirebalaisHospitalServiceImpl method getIdentifierSource.
private <T extends IdentifierSource> T getIdentifierSource(String uuid, Class<T> sourceType) {
IdentifierSourceService iss = Context.getService(IdentifierSourceService.class);
IdentifierSource source = iss.getIdentifierSourceByUuid(uuid);
if (source == null) {
throw new IllegalStateException(sourceType.getSimpleName() + " has not been configured");
}
return (T) source;
}
use of org.openmrs.module.idgen.IdentifierSource in project openmrs-module-pihcore by PIH.
the class ConfigureHaitiIdGenerators method getIdentifierSource.
private <T extends IdentifierSource> T getIdentifierSource(String uuid, Class<T> sourceType) {
IdentifierSourceService iss = Context.getService(IdentifierSourceService.class);
IdentifierSource source = iss.getIdentifierSourceByUuid(uuid);
if (source == null) {
throw new IllegalStateException(sourceType.getSimpleName() + " has not been configured");
}
return (T) source;
}
Aggregations