use of org.hl7.v3.II in project integration-adaptor-111 by nhsconnect.
the class PatientMapper method getNhsNumberExtension.
private List<Extension> getNhsNumberExtension(II it) {
Extension extension = new Extension(NHS_VERIFICATION_STATUS);
Coding code = new Coding().setSystem(NHS_VERIFICATION_STATUS).setCode(mapNhsNumberVerificationStatus(it));
extension.setValue(new CodeableConcept(code));
return asList(extension);
}
use of org.hl7.v3.II in project org.hl7.fhir.core by hapifhir.
the class InstanceValidator method buildIdentifierExpression.
private void buildIdentifierExpression(ElementDefinition ed, StringBuilder expression, String discriminator, Identifier ii) throws DefinitionException {
if (ii.hasExtension())
throw new DefinitionException(context.formatMessage(I18nConstants.UNSUPPORTED_IDENTIFIER_PATTERN__EXTENSIONS_ARE_NOT_ALLOWED__FOR_DISCRIMINATOR_FOR_SLICE_, discriminator, ed.getId()));
boolean first = true;
expression.append(discriminator + ".where(");
if (ii.hasSystem()) {
first = false;
expression.append("system = '" + ii.getSystem() + "'");
}
if (ii.hasValue()) {
if (first)
first = false;
else
expression.append(" and ");
expression.append("value = '" + ii.getValue() + "'");
}
if (ii.hasUse()) {
if (first)
first = false;
else
expression.append(" and ");
expression.append("use = '" + ii.getUse() + "'");
}
if (ii.hasType()) {
if (first)
first = false;
else
expression.append(" and ");
buildCodeableConceptExpression(ed, expression, TYPE, ii.getType());
}
if (first) {
throw new DefinitionException(context.formatMessage(I18nConstants.UNSUPPORTED_IDENTIFIER_PATTERN_NO_PROPERTY_NOT_SUPPORTED_FOR_DISCRIMINATOR_FOR_SLICE, discriminator, ed.getId(), ii.fhirType()));
}
expression.append(").exists()");
}
use of org.hl7.v3.II in project webcert by sklintyg.
the class SendAnswerStubTest method createAnswer.
private SendMedicalCertificateAnswerType createAnswer(String message) {
SendMedicalCertificateAnswerType parameters = new SendMedicalCertificateAnswerType();
AnswerToFkType answerType = new AnswerToFkType();
answerType.setFkReferensId("fkReferensId");
answerType.setAmne(Amnetyp.OVRIGT);
InnehallType fraga = new InnehallType();
fraga.setMeddelandeText("fraga");
fraga.setSigneringsTidpunkt(LocalDateTime.now());
answerType.setFraga(fraga);
InnehallType svar = new InnehallType();
svar.setMeddelandeText(message);
svar.setSigneringsTidpunkt(LocalDateTime.now());
answerType.setSvar(svar);
answerType.setVardReferensId("vardRef");
answerType.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);
answerType.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);
answerType.setAdressVard(vardAdress);
parameters.setAnswer(answerType);
return parameters;
}
use of org.hl7.v3.II in project webcert by sklintyg.
the class ConvertToFKTypes method toII.
public static II toII(String root, String ext) {
if (root == null || ext == null) {
return null;
}
II ii = new II();
ii.setRoot(root);
ii.setExtension(ext);
return ii;
}
use of org.hl7.v3.II in project webcert by sklintyg.
the class ConvertToFKTypesTest method testToIIRootNull.
@Test
public void testToIIRootNull() {
II res = ConvertToFKTypes.toII(null, "ext");
assertNull(res);
}
Aggregations