Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 2a5ecbf6 authored by Wylem Bars's avatar Wylem Bars

PATREG-33 | Fix Usage that shall not be null using PAM schema

parent 6f79d685
Pipeline #138294 canceled with stages
in 3 minutes
package net.ihe.gazelle.app.patientregistryservice.adapter.dao.pamsimulator.converter;
import net.ihe.gazelle.app.patientregistryapi.business.EntityIdentifier;
import net.ihe.gazelle.app.patientregistryservice.adapter.dao.pamsimulator.model.patient.DesignatorTypeDB;
import net.ihe.gazelle.app.patientregistryservice.adapter.dao.pamsimulator.model.patient.HierarchicDesignatorDB;
import net.ihe.gazelle.app.patientregistryservice.adapter.dao.pamsimulator.model.patient.PatientDB;
import net.ihe.gazelle.app.patientregistryservice.adapter.dao.pamsimulator.model.patient.PatientIdentifierDB;
......@@ -49,6 +50,7 @@ public class IdentifierConverter {
HierarchicDesignatorDB designator = new HierarchicDesignatorDB();
designator.setUniversalID(identifier.getSystemIdentifier());
designator.setNamespaceID(identifier.getSystemName());
designator.setUsage(DesignatorTypeDB.PATIENT_ID);
patientIdentifierDB.setDomain(designator);
}
return patientIdentifierDB;
......
......@@ -2,6 +2,7 @@ package net.ihe.gazelle.app.patientregistryservice.adapter.dao.pamsimulator.serv
import net.ihe.gazelle.app.patientregistryapi.application.DomainService;
import net.ihe.gazelle.app.patientregistryservice.adapter.dao.EntityManagerProducer;
import net.ihe.gazelle.app.patientregistryservice.adapter.dao.pamsimulator.model.patient.DesignatorTypeDB;
import net.ihe.gazelle.app.patientregistryservice.adapter.dao.pamsimulator.model.patient.HierarchicDesignatorDB;
import javax.inject.Inject;
......@@ -81,6 +82,7 @@ public class DomainDAOImpl implements DomainDAO, DomainService {
@Override
public void createDomain(String domainIdentifier, String domainName) {
HierarchicDesignatorDB domain = new HierarchicDesignatorDB(domainName, domainIdentifier, "ISO", null);
domain.setUsage(DesignatorTypeDB.PATIENT_ID);
entityManager.persist(domain);
entityManager.flush();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment