Skip to content

Commit

Permalink
[26930] Move data.Kontakt XID Initialisation to XIDService
Browse files Browse the repository at this point in the history
  • Loading branch information
col-panic committed Feb 6, 2025
1 parent 2ff0b61 commit 69bfcf5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
18 changes: 0 additions & 18 deletions bundles/ch.elexis.core.data/src/ch/elexis/data/Kontakt.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@
import org.apache.commons.lang3.StringUtils;

import ch.elexis.core.constants.StringConstants;
import ch.elexis.core.constants.XidConstants;
import ch.elexis.core.data.service.CoreModelServiceHolder;
import ch.elexis.core.model.ICodeElement;
import ch.elexis.core.model.IContact;
import ch.elexis.core.services.holder.AccessControlServiceHolder;
import ch.elexis.util.MFUList;
import ch.rgw.tools.StringTool;

Expand Down Expand Up @@ -95,22 +93,6 @@ protected String getTableName() {
FLD_REMARK, FLD_PHONE1, FLD_PHONE2, "E-Mail=EMail", FLD_E_MAIL2, FLD_WEBSITE, FLD_EXTINFO, //$NON-NLS-1$
FLD_IS_ORGANIZATION, FLD_IS_PERSON, FLD_IS_PATIENT, FLD_IS_USER, FLD_IS_MANDATOR, FLD_IS_LAB,
FLD_STREET, FLD_ZIP, FLD_PLACE, FLD_COUNTRY, FLD_FAX, FLD_ANSCHRIFT, FLD_MOBILEPHONE, "PatientNr"); //$NON-NLS-1$

AccessControlServiceHolder.get().doPrivileged(() -> {
// TODO move to NoPo initialisation
Xid.localRegisterXIDDomainIfNotExists(XidConstants.XID_KONTAKT_ANREDE, "Anrede", Xid.ASSIGNMENT_REGIONAL);
Xid.localRegisterXIDDomainIfNotExists(XidConstants.XID_KONTAKT_KANTON, "Kanton", Xid.ASSIGNMENT_REGIONAL);
Xid.localRegisterXIDDomainIfNotExists(XidConstants.XID_KONTAKT_SPEZ, "Spezialität",
Xid.ASSIGNMENT_REGIONAL);
Xid.localRegisterXIDDomainIfNotExists(XidConstants.XID_KONTAKT_ROLLE, "Rolle", Xid.ASSIGNMENT_REGIONAL);
Xid.localRegisterXIDDomainIfNotExists(XidConstants.XID_KONTAKT_LAB_SENDING_FACILITY, "Sendende Institution",
Xid.ASSIGNMENT_REGIONAL);
// TODO move to NoPo initialisation
Xid.getDomain(XidConstants.XID_KONTAKT_ANREDE).addDisplayOption(Person.class);
Xid.getDomain(XidConstants.XID_KONTAKT_KANTON).addDisplayOption(Person.class);
Xid.getDomain(XidConstants.XID_KONTAKT_SPEZ).addDisplayOption(Person.class);
Xid.getDomain(XidConstants.XID_KONTAKT_LAB_SENDING_FACILITY).addDisplayOption(Labor.class);
});
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ private void loadDomains() {
"ch.elexis.data.Kontakt,ch.elexis.data.Person,ch.elexis.data.Organisation");
localRegisterXIDDomainIfNotExists(DOMAIN_KSK, "KSK/ZSR-Nr", ASSIGNMENT_REGIONAL,
"ch.elexis.data.Kontakt,ch.elexis.data.Person,ch.elexis.data.Organisation");

localRegisterXIDDomainIfNotExists(XidConstants.XID_KONTAKT_ANREDE, "Anrede", ASSIGNMENT_REGIONAL);
localRegisterXIDDomainIfNotExists(XidConstants.XID_KONTAKT_KANTON, "Kanton", ASSIGNMENT_REGIONAL);
localRegisterXIDDomainIfNotExists(XidConstants.XID_KONTAKT_SPEZ, "Spezialität", ASSIGNMENT_REGIONAL);
localRegisterXIDDomainIfNotExists(XidConstants.XID_KONTAKT_ROLLE, "Rolle", ASSIGNMENT_REGIONAL);
localRegisterXIDDomainIfNotExists(XidConstants.XID_KONTAKT_LAB_SENDING_FACILITY, "Sendende Institution",
ASSIGNMENT_REGIONAL);
}

private void loadDomainsSplitString(String storedDomains) {
Expand Down

0 comments on commit 69bfcf5

Please sign in to comment.