Commit cc8b18e6 authored by Tony Schaller's avatar Tony Schaller

Code clean-up

git-svn-id: https://svn.code.sf.net/p/ehealthconnector/code/trunk@1703 e99adb7c-5e35-42fd-8d1b-cdb378af05e8
parent c42cb7d9
......@@ -148,8 +148,8 @@ public class ActiveProblemConcern extends ProblemConcern {
* problem concern status</div> <div class="it"> problem concern
* status</div>
*/
public ActiveProblemConcern(String concern, Date begin, Date end,
BaseProblemEntry problemEntry, ProblemConcernStatusCode problemConcernStatus) {
public ActiveProblemConcern(String concern, Date begin, Date end, BaseProblemEntry problemEntry,
ProblemConcernStatusCode problemConcernStatus) {
super(concern, problemEntry, problemConcernStatus, begin, end);
}
}
......@@ -25,8 +25,8 @@ import org.ehealth_connector.common.Code;
import org.ehealth_connector.common.utils.Util;
import org.openhealthtools.mdht.uml.cda.CDAFactory;
import org.openhealthtools.mdht.uml.cda.ExternalDocument;
import org.openhealthtools.mdht.uml.cda.ch.ChFactory;
import org.openhealthtools.mdht.uml.cda.ch.CdaChBodyExtRef;
import org.openhealthtools.mdht.uml.cda.ch.ChFactory;
import org.openhealthtools.mdht.uml.hl7.datatypes.DatatypesFactory;
import org.openhealthtools.mdht.uml.hl7.datatypes.II;
import org.openhealthtools.mdht.uml.hl7.vocab.ActClassDocument;
......
......@@ -25,13 +25,13 @@ import java.util.List;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.ehealth_connector.cda.BaseAllergyProblem;
import org.ehealth_connector.cda.AbstractCda;
import org.ehealth_connector.cda.AllergyConcern;
import org.ehealth_connector.cda.BaseAllergyProblem;
import org.ehealth_connector.cda.BaseObservation;
import org.ehealth_connector.cda.BaseOrganizer;
import org.ehealth_connector.cda.BaseProblemConcern;
import org.ehealth_connector.cda.BaseProblemEntry;
import org.ehealth_connector.cda.AllergyConcern;
import org.ehealth_connector.cda.ch.ActiveProblemConcern;
import org.ehealth_connector.cda.ch.PastProblemConcern;
import org.ehealth_connector.cda.ch.ProblemConcern;
......
......@@ -21,8 +21,8 @@ package org.ehealth_connector.cda.ch.edes.enums;
import org.ehealth_connector.cda.enums.ContentIdPrefix;
import org.ehealth_connector.common.enums.LanguageCode;
import org.openhealthtools.mdht.uml.cda.Section;
import org.openhealthtools.mdht.uml.cda.ch.ChFactory;
import org.openhealthtools.mdht.uml.cda.ch.CdaChEdesV1;
import org.openhealthtools.mdht.uml.cda.ch.ChFactory;
import org.openhealthtools.mdht.uml.cda.ihe.IHEFactory;
import org.openhealthtools.mdht.uml.cda.ihe.pcc.PCCFactory;
import org.openhealthtools.mdht.uml.hl7.datatypes.CE;
......
......@@ -29,7 +29,7 @@ import org.openhealthtools.mdht.uml.hl7.datatypes.DatatypesFactory;
/**
* This class has been moved and extended to org.ehealth_connector.cda.enums as
* it is used by other classes in org.ehealth_connector.cda
*
*
* @author sts
*
*/
......
......@@ -35,13 +35,16 @@ import org.openhealthtools.mdht.uml.hl7.datatypes.DatatypesFactory;
public enum QualabQcc {
/** <div class="en">Centre Suisse de Contrôle de Qualité CSCQ</div>. */
CENTRE_SUISSE_DE_CONTRÔLE_DE_QUALITÉ_CSCQ("7601001326507", "Centre Suisse de Contrôle de Qualité CSCQ", "20150101", ""),
CENTRE_SUISSE_DE_CONTRÔLE_DE_QUALITÉ_CSCQ("7601001326507",
"Centre Suisse de Contrôle de Qualité CSCQ", "20150101", ""),
/** <div class="en">Interregionale Blutspende SRK AG</div>. */
INTERREGIONALE_BLUTSPENDE_SRK_AG("7601001363540", "Interregionale Blutspende SRK AG", "20150101", ""),
INTERREGIONALE_BLUTSPENDE_SRK_AG("7601001363540", "Interregionale Blutspende SRK AG",
"20150101", ""),
/** <div class="en">Verein für medizinische Qualitätskontrolle</div>. */
VEREIN_FÜR_MEDIZINISCHE_QUALITÄTSKONTROLLE("7601001402805", "Verein für medizinische Qualitätskontrolle", "20150101", "");
VEREIN_FÜR_MEDIZINISCHE_QUALITÄTSKONTROLLE("7601001402805",
"Verein für medizinische Qualitätskontrolle", "20150101", "");
/**
* <div class="en">Code for Centre Suisse de Contrôle de Qualité CSCQ</div>.
......
......@@ -56,7 +56,8 @@ public enum SpecialtySections {
HLA_STUDIES("18724-5", "HLA studies", "20150101", ""),
/** <div class="en">Microbial susceptibility tests Set</div>. */
MICROBIAL_SUSCEPTIBILITY_TESTS_SET("18769-0", "Microbial susceptibility tests Set", "20150101", ""),
MICROBIAL_SUSCEPTIBILITY_TESTS_SET("18769-0", "Microbial susceptibility tests Set", "20150101",
""),
/** <div class="en">Microbiology studies</div>. */
MICROBIOLOGY_STUDIES("18725-2", "Microbiology studies", "20150101", ""),
......
......@@ -34,7 +34,8 @@ public enum LrtpSections {
* <div class="en">Relevant diagnostic tests/laboratory data</div>
* <div class="de">Blutgruppe</div>.
*/
RELEVANT_DIAGNOSTIC_TESTSLABORATORY_DATA("30954-2", "Relevant diagnostic tests/laboratory data"),
RELEVANT_DIAGNOSTIC_TESTSLABORATORY_DATA("30954-2",
"Relevant diagnostic tests/laboratory data"),
/** <div class="en">Vital signs</div> <div class="de">Vitalzeichen</div>. */
VITAL_SIGNS("8716-3", "Vital signs");
......
......@@ -21,10 +21,10 @@ package org.ehealth_connector.cda.ch.textbuilder;
import java.util.ArrayList;
import java.util.List;
import org.ehealth_connector.cda.AllergyConcern;
import org.ehealth_connector.cda.BaseAllergyConcern;
import org.ehealth_connector.cda.BaseAllergyProblem;
import org.ehealth_connector.cda.BaseAllergyProblemComparator;
import org.ehealth_connector.cda.AllergyConcern;
import org.ehealth_connector.cda.enums.ContentIdPrefix;
import org.ehealth_connector.cda.textbuilder.AllergyConcernTextBuilder;
import org.ehealth_connector.common.Value;
......
......@@ -72,8 +72,7 @@ public class EdDiagnosisChTextBuilder extends TextBuilder {
append("</thead>");
}
private void addRow(org.ehealth_connector.cda.BaseProblemConcern problemConcerns,
int index) {
private void addRow(org.ehealth_connector.cda.BaseProblemConcern problemConcerns, int index) {
// Currently only German available. Translation contributions are
// welcome
int i = 0;
......
......@@ -123,9 +123,8 @@ public class ObservationChTextBuilder extends TextBuilder {
* @param lang
* the language.
*/
public ObservationChTextBuilder(ClinicalDocument doc,
BaseLaboratorySpecialtySection section, int sectionIndex,
ContentIdPrefix contentIdPrefix, LanguageCode lang) {
public ObservationChTextBuilder(ClinicalDocument doc, BaseLaboratorySpecialtySection section,
int sectionIndex, ContentIdPrefix contentIdPrefix, LanguageCode lang) {
this(doc, section, sectionIndex, contentIdPrefix.getContentIdPrefix(), lang, null);
}
......@@ -146,9 +145,9 @@ public class ObservationChTextBuilder extends TextBuilder {
* the oid of the code system to be used as position (e.g.
* 2.16.756.5.30.1.129.1.3 for the Swiss Analysis List)
*/
public ObservationChTextBuilder(ClinicalDocument doc,
BaseLaboratorySpecialtySection section, int sectionIndex,
ContentIdPrefix contentIdPrefix, LanguageCode lang, String posCodeSystemOid) {
public ObservationChTextBuilder(ClinicalDocument doc, BaseLaboratorySpecialtySection section,
int sectionIndex, ContentIdPrefix contentIdPrefix, LanguageCode lang,
String posCodeSystemOid) {
this(doc, section, sectionIndex, contentIdPrefix.getContentIdPrefix(), lang,
posCodeSystemOid);
}
......@@ -171,9 +170,8 @@ public class ObservationChTextBuilder extends TextBuilder {
* as position (e.g. 2.16.756.5.30.1.129.1.3 for the Swiss
* Analysis List)
*/
public ObservationChTextBuilder(ClinicalDocument doc,
BaseLaboratorySpecialtySection section, int sectionIndex, String contentIdPrefix,
LanguageCode lang, String posCodeSystemOid) {
public ObservationChTextBuilder(ClinicalDocument doc, BaseLaboratorySpecialtySection section,
int sectionIndex, String contentIdPrefix, LanguageCode lang, String posCodeSystemOid) {
this.doc = doc;
this.sectionIndex = sectionIndex;
this.codedVitalSignsSection = null;
......
......@@ -75,8 +75,7 @@ public class ProblemConcernEntryChTextBuilder extends TextBuilder {
append("</thead>");
}
private void addRow(org.ehealth_connector.cda.BaseProblemConcern problemConcerns,
int index) {
private void addRow(org.ehealth_connector.cda.BaseProblemConcern problemConcerns, int index) {
// Currently only German available. Translation contributions are
// welcome
int i = 0;
......
......@@ -38,7 +38,8 @@ public enum CdaChVacdImmunizations {
DIPHTHERIA("76668005", "Diphtheria vaccination (procedure)", "20130101", "", 1),
/** Haemophilus influenzae type b vaccination (procedure) */
HAEMOPHILUS("127787002", "Haemophilus influenzae type b vaccination (procedure)", "20130101", "", 5),
HAEMOPHILUS("127787002", "Haemophilus influenzae type b vaccination (procedure)", "20130101",
"", 5),
/** Hepatitis A immunization (procedure) */
HEPA("243789007", "Hepatitis A immunization (procedure)", "20130101", "", 7),
......@@ -62,7 +63,8 @@ public enum CdaChVacdImmunizations {
MUMPS("50583002", "Mumps vaccination (procedure)", "20130101", "", 9),
/** Vaccination for human papillomavirus (procedure) */
PAPILLOMAVIRUS("428570002", "Vaccination for human papillomavirus (procedure)", "20130101", "", 12),
PAPILLOMAVIRUS("428570002", "Vaccination for human papillomavirus (procedure)", "20130101", "",
12),
/** Pertussis vaccination (procedure) */
PERTUSSIS("39343008", "Pertussis vaccination (procedure)", "20130101", "", 3),
......@@ -83,7 +85,8 @@ public enum CdaChVacdImmunizations {
TETANUS("127786006", "Tetanus vaccination (procedure)", "20130101", "", 2),
/** Tick-borne encephalitis vaccination (procedure) */
TICKBORNENCEPHALITIS("281658005", "Tick-borne encephalitis vaccination (procedure)", "20130101", "", 24),
TICKBORNENCEPHALITIS("281658005", "Tick-borne encephalitis vaccination (procedure)", "20130101",
"", 24),
/** Typhus vaccination (procedure) */
TYPHUS("30338008", "Typhus vaccination (procedure)", "20130101", "", 34),
......
......@@ -35,28 +35,35 @@ public enum CdaChVacdRecCategories {
* <div class="fr">Vaccinations recommandées de base</div>
* <div class="it">Vaccinazioni raccomandate di base</div>
*/
REC_BASE("41501", "Empfohlene Basisimpfungen", "Vaccinations recommandées de base", "Vaccinazioni raccomandate di base", "20150101", ""),
REC_BASE("41501", "Empfohlene Basisimpfungen", "Vaccinations recommandées de base",
"Vaccinazioni raccomandate di base", "20150101", ""),
/**
* <div class="de"> Empfohlene ergänzende Impfungen</div>
* <div class="fr">Vaccinations recommandées complémentaires</div>
* <div class="it">Vaccinazioni raccomandate complementari</div>
*/
REC_COMPL("41502", "Empfohlene ergänzende Impfungen", "Vaccinations recommandées complémentaires", "Vaccinazioni raccomandate complementari", "20150101", ""),
REC_COMPL("41502", "Empfohlene ergänzende Impfungen",
"Vaccinations recommandées complémentaires", "Vaccinazioni raccomandate complementari",
"20150101", ""),
/**
* <div class="de"> Impfungen ohne Empfehlungen</div>
* <div class="fr">Vaccinations sans recommandation d’utilisation</div>
* <div class="it">Vaccinazioni senza raccomandazione d’utilizzo</div>
*/
REC_NONE("41504", "Impfungen ohne Empfehlungen", "Vaccinations sans recommandation d’utilisation", "Vaccinazioni senza raccomandazione d’utilizzo", "20150101", ""),
REC_NONE("41504", "Impfungen ohne Empfehlungen",
"Vaccinations sans recommandation d’utilisation",
"Vaccinazioni senza raccomandazione d’utilizzo", "20150101", ""),
/**
* <div class="de"> Empfohlene Impfungen für Risikogruppen</div>
* <div class="fr">Vaccinations recommandées à des groupes à risque</div>
* <div class="it">Vaccinazioni raccomandate a die gruppi a rischio</div>
*/
REC_RISK("41503", "Empfohlene Impfungen für Risikogruppen", "Vaccinations recommandées à des groupes à risque", "Vaccinazioni raccomandate a die gruppi a rischio", "20150101", "");
REC_RISK("41503", "Empfohlene Impfungen für Risikogruppen",
"Vaccinations recommandées à des groupes à risque",
"Vaccinazioni raccomandate a die gruppi a rischio", "20150101", "");
/** The Constant CODE_SYSTEM_NAME. */
public static final String CODE_SYSTEM_NAME = "CDA-CH-VACD rec-categories";
......
......@@ -32,11 +32,11 @@ import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathFactory;
import org.ehealth_connector.cda.BaseAllergyConcern;
import org.ehealth_connector.cda.BaseAllergyProblem;
import org.ehealth_connector.cda.AbstractPregnancyHistory;
import org.ehealth_connector.cda.AllergyConcern;
import org.ehealth_connector.cda.AllergyProblem;
import org.ehealth_connector.cda.BaseAllergyConcern;
import org.ehealth_connector.cda.BaseAllergyProblem;
import org.ehealth_connector.cda.Consumable;
import org.ehealth_connector.cda.Problem;
import org.ehealth_connector.cda.SectionAnnotationCommentEntry;
......
......@@ -107,8 +107,7 @@ public abstract class AbstractCodedVitalSigns extends MdhtFacade<VitalSignsSecti
}
ret.sort(new Comparator<BaseVitalSignObservation>() {
@Override
public int compare(BaseVitalSignObservation left,
BaseVitalSignObservation right) {
public int compare(BaseVitalSignObservation left, BaseVitalSignObservation right) {
return right.getEffectiveTime().compareTo(left.getEffectiveTime());
}
});
......
......@@ -100,7 +100,8 @@ public abstract class AbstractExternalReferenceEntry
int result = 1;
result = (prime * result) + (this.getExternalDocumentEntry() != null
? this.getExternalDocumentEntry().hashCode() : 0);
? this.getExternalDocumentEntry().hashCode()
: 0);
return result;
}
......
......@@ -79,8 +79,7 @@ public class BaseAllergyConcern extends AbstractConcern {
* @param mdht
* allergy concern
**/
public BaseAllergyConcern(
org.openhealthtools.mdht.uml.cda.ihe.AllergyIntoleranceConcern mdht) {
public BaseAllergyConcern(org.openhealthtools.mdht.uml.cda.ihe.AllergyIntoleranceConcern mdht) {
super(mdht);
mAllergyConcern = (org.openhealthtools.mdht.uml.cda.ihe.AllergyIntoleranceConcern) super.getMdhtConcern();
}
......@@ -96,8 +95,7 @@ public class BaseAllergyConcern extends AbstractConcern {
* @param lang
* the language
*/
public BaseAllergyConcern(
org.openhealthtools.mdht.uml.cda.ihe.AllergyIntoleranceConcern mdht,
public BaseAllergyConcern(org.openhealthtools.mdht.uml.cda.ihe.AllergyIntoleranceConcern mdht,
LanguageCode lang) {
super(mdht);
myLang = lang;
......@@ -166,8 +164,8 @@ public class BaseAllergyConcern extends AbstractConcern {
* (active/suspended/aborted/completed)</div> <div class="fr">Le
* statut du problème (active/suspended/aborted/completed)</div>
*/
public BaseAllergyConcern(String concern, Date begin, Date end,
BaseAllergyProblem problemEntry, ProblemConcernStatusCode concernStatus) {
public BaseAllergyConcern(String concern, Date begin, Date end, BaseAllergyProblem problemEntry,
ProblemConcernStatusCode concernStatus) {
this(concern, problemEntry, concernStatus);
if (end != null) {
setEffectiveTime(begin, end);
......
......@@ -130,8 +130,9 @@ public class SectionAnnotationCommentEntry
public int hashCode() {
final int prime = 31;
int result = 1;
result = (prime * result) + (this.getContentIdReference() != null
? this.getContentIdReference().hashCode() : 0);
result = (prime * result)
+ (this.getContentIdReference() != null ? this.getContentIdReference().hashCode()
: 0);
return result;
}
......
......@@ -56,7 +56,8 @@ public enum RouteOfAdministration {
* <div class="de">Inhalation, Vernebelung, nasal</div>
* <div class="fr">Inhalation par nébulisation nasale</div>
*/
INHALATION_NEBULIZATION_NASAL("NASNEB", "Inhalation, nebulization, nasal", "Inhalation, nébulisation, nasal"),
INHALATION_NEBULIZATION_NASAL("NASNEB", "Inhalation, nebulization, nasal",
"Inhalation, nébulisation, nasal"),
/**
* <div class="en"> injection, intra-abdominal</div><div class="fr">intra
......@@ -122,7 +123,8 @@ public enum RouteOfAdministration {
* <div class="en"> instillation, nasogastric</div><div class="fr">par sonde
* naso gastrique</div>
*/
INSTILLATION_NASOGASTRIC("NASOGASINSTIL", "instillation, nasogastric", "par sonde naso gastrique"),
INSTILLATION_NASOGASTRIC("NASOGASINSTIL", "instillation, nasogastric",
"par sonde naso gastrique"),
/**
* <div class="en"> instillation, otic</div><div class="fr">dans
......@@ -170,7 +172,7 @@ public enum RouteOfAdministration {
public static final String CODE_SYSTEM_NAME = "RouteOfAdministration";
public static final String CODE_SYSTEM_OID = "2.16.840.1.113883.5.112";
public static final String DIFFUSION_TRANSDERMAL_CODE = "TRNSDERMD";
public static final String INHALATION_NEBULIZATION_NASAL_CODE = "NASNEB";
public static final String INJECTION_INTRADERMAL_CODE = "IDINJ";
......@@ -233,7 +235,7 @@ public enum RouteOfAdministration {
}
return false;
}
/** The code. */
private String code;
......@@ -290,8 +292,8 @@ public enum RouteOfAdministration {
displayName = displayNameEn;
break;
}
}
else displayName = displayNameEn;
} else
displayName = displayNameEn;
ce.setDisplayName(displayName);
return ce;
}
......@@ -324,9 +326,9 @@ public enum RouteOfAdministration {
displayName = displayNameEn;
break;
}
}
else displayName = displayNameEn;
} else
displayName = displayNameEn;
final Code ehcCode = new Code(CODE_SYSTEM_OID, code, CODE_SYSTEM_NAME, displayName);
return ehcCode;
}
......
......@@ -61,8 +61,7 @@ public abstract class AbstractLaboratoryReportDataProcessingEntry extends
* @param specimenAct
* the new specimen act
*/
public void setSpecimenAct(
org.ehealth_connector.cda.ihe.lab.BaseLaboratoryAct specimenAct) {
public void setSpecimenAct(org.ehealth_connector.cda.ihe.lab.BaseLaboratoryAct specimenAct) {
getMdht().setAct(specimenAct.getMdht());
}
}
......@@ -43,33 +43,11 @@ public class DispenseItemReferenceEntry extends DispenseItemEntry {
this(PHARMFactory.eINSTANCE.createDispenseItemReferenceEntry().init());
}
/**
* Instantiates a new dispense item reference entry.
*
* @param mdht
* the mdht
*/
public DispenseItemReferenceEntry(
org.openhealthtools.mdht.uml.cda.ihe.pharm.DispenseItemReferenceEntry mdht) {
super(mdht);
final String templateId = this.getTemplateId();
this.getMdht().getTemplateIds().clear();
this.getMdht().getTemplateIds().add(new Identificator(templateId, null).getIi());
final Product product = CDAFactory.eINSTANCE.createProduct();
final ManufacturedProduct manufacturedProduct = CDAFactory.eINSTANCE
.createManufacturedProduct();
final Material material = CDAFactory.eINSTANCE.createMaterial();
material.setNullFlavor(NullFlavor.NA);
manufacturedProduct.setManufacturedMaterial(material);
product.setManufacturedProduct(manufacturedProduct);
this.getMdht().setProduct(product);
}
/**
* Instantiates a new dispense item reference entry.
*
* @param itemId
* ID of referenced item
* ID of referenced item
*/
public DispenseItemReferenceEntry(Identificator itemId) {
......@@ -89,6 +67,26 @@ public class DispenseItemReferenceEntry extends DispenseItemEntry {
this.getMdht().getIds().add(itemId.getIi());
}
/**
* Instantiates a new dispense item reference entry.
*
* @param mdht
* the mdht
*/
public DispenseItemReferenceEntry(
org.openhealthtools.mdht.uml.cda.ihe.pharm.DispenseItemReferenceEntry mdht) {
super(mdht);
final String templateId = this.getTemplateId();
this.getMdht().getTemplateIds().clear();
this.getMdht().getTemplateIds().add(new Identificator(templateId, null).getIi());
final Product product = CDAFactory.eINSTANCE.createProduct();
final ManufacturedProduct manufacturedProduct = CDAFactory.eINSTANCE
.createManufacturedProduct();
final Material material = CDAFactory.eINSTANCE.createMaterial();
material.setNullFlavor(NullFlavor.NA);
manufacturedProduct.setManufacturedMaterial(material);
product.setManufacturedProduct(manufacturedProduct);
this.getMdht().setProduct(product);
}
}
......@@ -43,6 +43,31 @@ public class MedicationTreatmentPlanItemReferenceEntry extends MedicationTreatme
this(PHARMFactory.eINSTANCE.createMedicationTreatmentPlanItemReferenceEntry().init());
}
/**
* Instantiates a new medication treatment plan item reference entry.
*
* @param itemId
* IF of referenced item
*/
public MedicationTreatmentPlanItemReferenceEntry(Identificator itemId) {
this(PHARMFactory.eINSTANCE.createMedicationTreatmentPlanItemReferenceEntry().init());
final CD cd = DatatypesFactory.eINSTANCE.createCD();
cd.setCode(PharmacyItemTypeList.MTPItem.getCode().getCode());
cd.setCodeSystem(PharmacyItemTypeList.CODE_SYSTEM_OID);
cd.setCodeSystemName(PharmacyItemTypeList.CODE_SYSTEM_NAME);
cd.setDisplayName(PharmacyItemTypeList.MTPItem.getCode().getDisplayName());
this.getMdht().setCode(cd);
this.getMdht().setRouteCode(null);
this.getMdht().setMoodCode(x_DocumentSubstanceMood.INT);
this.getMdht().setClassCode(ActClass.SBADM);
this.getMdht().getIds().add(itemId.getIi());
}
/**
* Instantiates a new medication treatment plan item reference entry.
*
......@@ -73,30 +98,4 @@ public class MedicationTreatmentPlanItemReferenceEntry extends MedicationTreatme
this.getMdht().setConsumable(consumable);
}
/**
* Instantiates a new medication treatment plan item reference entry.
*
* @param itemId
* IF of referenced item
*/
public MedicationTreatmentPlanItemReferenceEntry(Identificator itemId) {
this(PHARMFactory.eINSTANCE.createMedicationTreatmentPlanItemReferenceEntry().init());
final CD cd = DatatypesFactory.eINSTANCE.createCD();
cd.setCode(PharmacyItemTypeList.MTPItem.getCode().getCode());
cd.setCodeSystem(PharmacyItemTypeList.CODE_SYSTEM_OID);
cd.setCodeSystemName(PharmacyItemTypeList.CODE_SYSTEM_NAME);
cd.setDisplayName(PharmacyItemTypeList.MTPItem.getCode().getDisplayName());
this.getMdht().setCode(cd);
this.getMdht().setRouteCode(null);
this.getMdht().setMoodCode(x_DocumentSubstanceMood.INT);
this.getMdht().setClassCode(ActClass.SBADM);
this.getMdht().getIds().add(itemId.getIi());
}
}
......@@ -43,6 +43,31 @@ public class PrescriptionItemReferenceEntry extends PrescriptionItemEntry {
this(PHARMFactory.eINSTANCE.createPrescriptionItemReferenceEntry().init());
}
/**
* Instantiates a new prescription item reference entry.
*
* @param itemId
* ID of the referenced item
*/
public PrescriptionItemReferenceEntry(Identificator itemId) {
this(PHARMFactory.eINSTANCE.createPrescriptionItemReferenceEntry().init());
final CD cd = DatatypesFactory.eINSTANCE.createCD();
cd.setCode(PharmacyItemTypeList.PREItem.getCode().getCode());
cd.setCodeSystem(PharmacyItemTypeList.CODE_SYSTEM_OID);
cd.setCodeSystemName(PharmacyItemTypeList.CODE_SYSTEM_NAME);
cd.setDisplayName(PharmacyItemTypeList.PREItem.getCode().getDisplayName());
this.getMdht().setCode(cd);
this.getMdht().setRouteCode(null);
this.getMdht().setMoodCode(x_DocumentSubstanceMood.INT);
this.getMdht().setClassCode(ActClass.SBADM);
this.getMdht().getIds().add(itemId.getIi());
}
/**
* Instantiates a new prescription item reference entry.
*
......@@ -73,30 +98,4 @@ public class PrescriptionItemReferenceEntry extends PrescriptionItemEntry {
this.getMdht().setConsumable(consumable);
}
/**
* Instantiates a new prescription item reference entry.
*
* @param itemId
* ID of the referenced item
*/
public PrescriptionItemReferenceEntry(Identificator itemId) {
this(PHARMFactory.eINSTANCE.createPrescriptionItemReferenceEntry().init());
final CD cd = DatatypesFactory.eINSTANCE.createCD();
cd.setCode(PharmacyItemTypeList.PREItem.getCode().getCode());
cd.setCodeSystem(PharmacyItemTypeList.CODE_SYSTEM_OID);
cd.setCodeSystemName(PharmacyItemTypeList.CODE_SYSTEM_NAME);
cd.setDisplayName(PharmacyItemTypeList.PREItem.getCode().getDisplayName());