Search in sources :

Example 6 with ConceptMapBuilder

use of org.openmrs.module.metadatadeploy.builder.ConceptMapBuilder in project openmrs-module-pihcore by PIH.

the class MockConcepts method diagnosis.

private Concept diagnosis(String name, ConceptSource source, String mapping) {
    Concept concept = diagnosis(name);
    concept.addConceptMapping(new ConceptMapBuilder(uuid()).type(sameAs).ensureTerm(source, mapping).build());
    return concept;
}
Also used : Concept(org.openmrs.Concept) ConceptMapBuilder(org.openmrs.module.metadatadeploy.builder.ConceptMapBuilder)

Example 7 with ConceptMapBuilder

use of org.openmrs.module.metadatadeploy.builder.ConceptMapBuilder in project openmrs-module-pihcore by PIH.

the class MockConcepts method finding.

private Concept finding(String name, ConceptDatatype datatype, ConceptSource source, String mapping) {
    Concept concept = baseConcept(name);
    concept.setDatatype(datatype);
    concept.setConceptClass(finding);
    concept.addConceptMapping(new ConceptMapBuilder(uuid()).type(sameAs).ensureTerm(source, mapping).build());
    return concept;
}
Also used : Concept(org.openmrs.Concept) ConceptMapBuilder(org.openmrs.module.metadatadeploy.builder.ConceptMapBuilder)

Example 8 with ConceptMapBuilder

use of org.openmrs.module.metadatadeploy.builder.ConceptMapBuilder in project openmrs-module-pihcore by PIH.

the class ConceptsFromMetadataSharing method diagnosis.

private Concept diagnosis(String name, ConceptSource source, String mapping) {
    Concept concept = diagnosis(name);
    concept.addConceptMapping(new ConceptMapBuilder(uuid()).type(sameAs).ensureTerm(source, mapping).build());
    return concept;
}
Also used : Concept(org.openmrs.Concept) ConceptMapBuilder(org.openmrs.module.metadatadeploy.builder.ConceptMapBuilder)

Example 9 with ConceptMapBuilder

use of org.openmrs.module.metadatadeploy.builder.ConceptMapBuilder in project openmrs-module-pihcore by PIH.

the class ConceptsFromMetadataSharing method question.

private Concept question(String name, ConceptDatatype datatype, ConceptSource source, String mapping) {
    Concept concept = baseConcept(name);
    concept.setDatatype(datatype);
    concept.setConceptClass(question);
    concept.addConceptMapping(new ConceptMapBuilder(uuid()).type(sameAs).ensureTerm(source, mapping).build());
    return concept;
}
Also used : Concept(org.openmrs.Concept) ConceptMapBuilder(org.openmrs.module.metadatadeploy.builder.ConceptMapBuilder)

Example 10 with ConceptMapBuilder

use of org.openmrs.module.metadatadeploy.builder.ConceptMapBuilder in project openmrs-module-pihcore by PIH.

the class ConceptsFromMetadataSharing method finding.

private Concept finding(String name, ConceptDatatype datatype, ConceptSource source, String mapping) {
    Concept concept = baseConcept(name);
    concept.setDatatype(datatype);
    concept.setConceptClass(finding);
    concept.addConceptMapping(new ConceptMapBuilder(uuid()).type(sameAs).ensureTerm(source, mapping).build());
    return concept;
}
Also used : Concept(org.openmrs.Concept) ConceptMapBuilder(org.openmrs.module.metadatadeploy.builder.ConceptMapBuilder)

Aggregations

ConceptMapBuilder (org.openmrs.module.metadatadeploy.builder.ConceptMapBuilder)25 Concept (org.openmrs.Concept)21 ConceptBuilder (org.openmrs.module.metadatadeploy.builder.ConceptBuilder)12 ConceptName (org.openmrs.ConceptName)4 ConceptNumericBuilder (org.openmrs.module.metadatadeploy.builder.ConceptNumericBuilder)4 ConceptClass (org.openmrs.ConceptClass)2 ConceptDatatype (org.openmrs.ConceptDatatype)2 ConceptMapType (org.openmrs.ConceptMapType)2 ConceptSource (org.openmrs.ConceptSource)2