Search in sources :

Example 6 with II

use of org.openehealth.ipf.commons.ihe.xacml20.stub.hl7v3.II in project nia-patient-switching-standard-adaptor by NHSDigital.

the class ConsultationListMapperTest method setUpCompoundStatement.

private RCMRMT030101UK04CompoundStatement setUpCompoundStatement(String originalText, String display, String availabilityTime, boolean nullFlavorCode) {
    RCMRMT030101UK04CompoundStatement compoundStatement = new RCMRMT030101UK04CompoundStatement();
    II id = new II();
    id.setRoot(COMPOUND_STATEMENT_ID);
    CD cd = new CD();
    if (nullFlavorCode) {
        cd.setNullFlavor(CsNullFlavor.UNK);
    } else {
        cd.setOriginalText(originalText);
        cd.setDisplayName(display);
        cd.setCodeSystem("2.16.840.1.113883.2.1.6.2");
        cd.setCode("14L..00");
    }
    TS ts = new TS();
    if (availabilityTime != null) {
        ts.setValue(availabilityTime);
    } else {
        ts.setNullFlavor(CsNullFlavor.NI);
    }
    compoundStatement.setAvailabilityTime(ts);
    compoundStatement.getId().add(id);
    compoundStatement.setCode(cd);
    return compoundStatement;
}
Also used : II(org.hl7.v3.II) CD(org.hl7.v3.CD) RCMRMT030101UK04CompoundStatement(org.hl7.v3.RCMRMT030101UK04CompoundStatement) TS(org.hl7.v3.TS)

Example 7 with II

use of org.openehealth.ipf.commons.ihe.xacml20.stub.hl7v3.II in project webcert by sklintyg.

the class SendQuestionStubTest method createQuestion.

private SendMedicalCertificateQuestionType createQuestion(String message) {
    SendMedicalCertificateQuestionType parameters = new SendMedicalCertificateQuestionType();
    QuestionToFkType questionType = new QuestionToFkType();
    questionType.setAmne(Amnetyp.OVRIGT);
    InnehallType svar = new InnehallType();
    svar.setMeddelandeText(message);
    svar.setSigneringsTidpunkt(LocalDateTime.now());
    questionType.setFraga(svar);
    questionType.setVardReferensId("vardRef");
    questionType.setAvsantTidpunkt(LocalDateTime.now());
    LakarutlatandeEnkelType lakarutlatande = new LakarutlatandeEnkelType();
    lakarutlatande.setLakarutlatandeId("id");
    lakarutlatande.setSigneringsTidpunkt(LocalDateTime.now());
    PatientType patient = new PatientType();
    II id = new II();
    id.setRoot("1.2.752.129.2.1.3.1");
    id.setExtension("19121212-1212");
    patient.setPersonId(id);
    patient.setFullstandigtNamn("namn");
    lakarutlatande.setPatient(patient);
    questionType.setLakarutlatande(lakarutlatande);
    VardAdresseringsType vardAdress = new VardAdresseringsType();
    HosPersonalType hosPersonal = new HosPersonalType();
    II hosId = new II();
    hosId.setRoot("1.2.752.129.2.1.4.1");
    hosId.setExtension("hosId");
    hosPersonal.setPersonalId(hosId);
    hosPersonal.setFullstandigtNamn("hosPersonal");
    EnhetType enhet = new EnhetType();
    II enhetsId = new II();
    enhetsId.setRoot("1.2.752.129.2.1.4.1");
    enhetsId.setExtension("enhetsId");
    enhet.setEnhetsId(enhetsId);
    enhet.setEnhetsnamn("enhetsnamn");
    VardgivareType vardgivare = new VardgivareType();
    II vardgivarId = new II();
    vardgivarId.setRoot("1.2.752.129.2.1.4.1");
    vardgivarId.setExtension("vardgivarId");
    vardgivare.setVardgivareId(vardgivarId);
    vardgivare.setVardgivarnamn("vardgivarnamn");
    enhet.setVardgivare(vardgivare);
    hosPersonal.setEnhet(enhet);
    vardAdress.setHosPersonal(hosPersonal);
    questionType.setAdressVard(vardAdress);
    parameters.setQuestion(questionType);
    return parameters;
}
Also used : II(iso.v21090.dt.v1.II)

Example 8 with II

use of org.openehealth.ipf.commons.ihe.xacml20.stub.hl7v3.II in project webcert by sklintyg.

the class ConvertToFKTypesTest method testToII.

@Test
public void testToII() {
    final String root = "root";
    final String ext = "ext";
    II res = ConvertToFKTypes.toII(root, ext);
    assertNotNull(res);
    assertEquals(root, res.getRoot());
    assertEquals(ext, res.getExtension());
}
Also used : II(iso.v21090.dt.v1.II) Test(org.junit.Test)

Aggregations

II (iso.v21090.dt.v1.II)6 Test (org.junit.Test)3 FunctionProcessingException (org.herasaf.xacml.core.function.FunctionProcessingException)1 CD (org.hl7.v3.CD)1 II (org.hl7.v3.II)1 RCMRMT030101UK04CompoundStatement (org.hl7.v3.RCMRMT030101UK04CompoundStatement)1 TS (org.hl7.v3.TS)1 II (org.openehealth.ipf.commons.ihe.xacml20.stub.hl7v3.II)1