use of com.nedap.archie.rm.support.identification.TerminologyId in project openEHR_SDK by ehrbase.
the class DvOrdinalValidatorTest method testValidate.
@Test
void testValidate() throws Exception {
var node = parseNode("/webtemplate_nodes/dv_ordinal.json");
var symbol = new DvCodedText("Test", new CodePhrase(new TerminologyId("local"), "at0010"));
var result = validator.validate(new DvOrdinal(1L, symbol), node);
assertTrue(result.isEmpty());
}
use of com.nedap.archie.rm.support.identification.TerminologyId in project openEHR_SDK by ehrbase.
the class DvStateValidatorTest method testValidate.
@Test
void testValidate() throws Exception {
var node = parseNode("/webtemplate_nodes/dv_state.json");
var dvState = new DvState();
dvState.setValue(new DvCodedText("Test", new CodePhrase(new TerminologyId("local"), "at0010")));
var result = validator.validate(dvState, node);
assertTrue(result.isEmpty());
}
use of com.nedap.archie.rm.support.identification.TerminologyId in project openEHR_SDK by ehrbase.
the class DvStateValidatorTest method testValidate_List.
@Test
void testValidate_List() throws Exception {
var node = parseNode("/webtemplate_nodes/dv_state_codedtext.json");
var dvState = new DvState();
dvState.setValue(new DvCodedText("First", new CodePhrase(new TerminologyId("local"), "at0028")));
var result = validator.validate(dvState, node);
assertTrue(result.isEmpty());
dvState.setValue(new DvCodedText("Test", new CodePhrase(new TerminologyId("local"), "at0010")));
result = validator.validate(dvState, node);
assertEquals(1, result.size());
}
use of com.nedap.archie.rm.support.identification.TerminologyId in project fhir-bridge by ehrbase.
the class KontaktActionConverter method mapContactWithInfected.
private void mapContactWithInfected(Boolean hadContact) {
DvCodedText dvCodedText = new DvCodedText("Done", new CodePhrase(new TerminologyId("local"), "at0016"));
kontaktAction.setCurrentState(dvCodedText);
if (hadContact) {
kontaktAction.setKontaktZuEinemBestaetigtenFallDefiningCode(AelterOderGleich65JahreAltDefiningCode.JA);
} else {
kontaktAction.setKontaktZuEinemBestaetigtenFallDefiningCode(AelterOderGleich65JahreAltDefiningCode.NEIN);
}
}
use of com.nedap.archie.rm.support.identification.TerminologyId in project fhir-bridge by ehrbase.
the class DocumentReferenceToHipDocumentConverter method getMultimedia.
private MediendateiCluster getMultimedia(DocumentReference documentReference) {
Attachment attachment = documentReference.getContentFirstRep().getAttachment();
DvMultimedia multimedia = new DvMultimedia();
multimedia.setUri(new DvURI(attachment.getUrl()));
multimedia.setMediaType(new CodePhrase(new TerminologyId("IANA_media-types"), attachment.getContentType()));
multimedia.setSize(attachment.getSize());
MediendateiCluster result = new MediendateiCluster();
result.setMediendateiInhalt(multimedia);
result.setMediendateiInhaltValue(attachment.getTitle());
result.setBeschreibungValue(documentReference.getDescription());
getCreation(attachment).ifPresent(result::setErstelltValue);
return result;
}
Aggregations