Search in sources :

Example 1 with ContactDetail

use of org.hl7.fhir.dstu3.model.ContactDetail in project gpconnect-demonstrator by nhsconnect.

the class PatientResourceProvider method getValidContact.

private ContactDetail getValidContact() {
    HumanName ctName = new HumanName();
    ctName.setUse(NameUse.OFFICIAL);
    ctName.setFamily("FamilyName");
    List<CodeableConcept> ctRelList = new ArrayList<>();
    ctRelList.add(createCoding("family", "Family", SystemURL.VS_PATIENT_CONTACT_REL));
    ContactDetail contact = new ContactDetail();
    contact.setName(ctName.toString());
    contact.addTelecom(staticElHelper.getValidTelecom());
    return contact;
}
Also used : ContactDetail(org.hl7.fhir.dstu3.model.ContactDetail) HumanName(org.hl7.fhir.dstu3.model.HumanName) ArrayList(java.util.ArrayList) CodeableConcept(org.hl7.fhir.dstu3.model.CodeableConcept)

Example 2 with ContactDetail

use of org.hl7.fhir.dstu3.model.ContactDetail in project gpconnect-demonstrator by nhsconnect.

the class OrganizationResourceProvider method getValidContact.

private ContactDetail getValidContact() {
    HumanName orgCtName = new HumanName();
    orgCtName.setUse(NameUse.USUAL);
    orgCtName.setFamily("FamilyName");
    Coding coding = new Coding().setSystem(SystemURL.VS_CC_ORG_CT_ENTITYTYPE).setDisplay("ADMIN");
    CodeableConcept orgCtPurpose = new CodeableConcept().addCoding(coding);
    ContactDetail orgContact = new ContactDetail();
    orgContact.setNameElement(orgCtName.getFamilyElement());
    orgContact.addTelecom(getValidTelecom());
    return orgContact;
}
Also used : ContactDetail(org.hl7.fhir.dstu3.model.ContactDetail) HumanName(org.hl7.fhir.dstu3.model.HumanName) Coding(org.hl7.fhir.dstu3.model.Coding) CodeableConcept(org.hl7.fhir.dstu3.model.CodeableConcept)

Aggregations

CodeableConcept (org.hl7.fhir.dstu3.model.CodeableConcept)2 ContactDetail (org.hl7.fhir.dstu3.model.ContactDetail)2 HumanName (org.hl7.fhir.dstu3.model.HumanName)2 ArrayList (java.util.ArrayList)1 Coding (org.hl7.fhir.dstu3.model.Coding)1