Package uk.nhs.interoperability.payloads.templates

Examples of uk.nhs.interoperability.payloads.templates.RecipientPersonUniversal


      missingFields.addMissingField("recipientOrganisationName", "The organisation name for the recipient must be provided");
    }
    if (missingFields.hasEntries()) {
      throw missingFields;
    }
    RecipientPersonUniversal template = new RecipientPersonUniversal();
    // ID (NULL)
    template.addId(new RoleID().setNullFlavour(NullFlavour.NA.code));
    // recipientName
    template.setName(recipient.getRecipientName());
    // recipientAddress
    if (recipient.getRecipientAddress() != null) {
      template.setAddress(recipient.getRecipientAddress());
    }
    // recipientTelephone
     if (recipient.getRecipientTelephone() != null) {
       template.addTelephoneNumber(new Telecom("tel:" + recipient.getRecipientTelephone()));
     }
    // recipientJobRole
     if (recipient.getRecipientJobRole() != null) {
       template.setJobRoleName(recipient.getRecipientJobRole());
     }
    // recipientODSCode
     template.setOrgId(new OrgID()
                 .setID(recipient.getRecipientODSCode())
                 .setType(OrgIDType.ODSOrgID.code));
    // recipientOrganisationName
     template.setOrgName(recipient.getRecipientOrganisationName());
    return template;
  }
View Full Code Here


    template.setAuthor(author);
    // Custodian
    CustodianOrganizationUniversal custodian = createCustodian();
    template.setCustodianOrganisation(custodian);
    // Recipients
    RecipientPersonUniversal recipient = createRecipient();
    template.addPrimaryRecipients(new PrimaryRecipient(recipient));
   
    // ==== Now create the coded sections ====
   
    template.setMainDocumentSectionID("5476CF02-89C2-11E3-A295-9E296288709B");
View Full Code Here

    template.setName("NORTH EAST LINCOLNSHIRE CARE TRUST");
    return template;
  }
 
  public static RecipientPersonUniversal createRecipient() {
    RecipientPersonUniversal template = new RecipientPersonUniversal();
    template.addId(new RoleID().setNullFlavour(NullFlavour.NI.code)); // Non-standard null flavour used in example XML..
    template.setJobRoleName(JobRoleName._GeneralMedicalPractitioner); // The example XML included a job role from a different vocab...
    template.setName(new PersonName("De Hopper"));
    template.setOrgId(new OrgID()
                .setID("V396F")
                .setType(OrgIDType.ODSOrgID.code));
    template.setOrgName("Dr De Hopper and Partners");
    return template;
  }
View Full Code Here

    template.setAuthor(author);
    // Custodian (Organisation hosting the EPaCCS)
    CustodianOrganizationUniversal custodian = createCustodian();
    template.setCustodianOrganisation(custodian);
    // Recipients
    RecipientPersonUniversal recipient = createRecipient();
    template.addPrimaryRecipients(new PrimaryRecipient(recipient));
   
    // ==== Now create the coded sections ====
   
    // End of Life Care Plan
View Full Code Here

    template.setName("NORTH EAST LINCOLNSHIRE CARE TRUST");
    return template;
  }
 
  public static RecipientPersonUniversal createRecipient() {
    RecipientPersonUniversal template = new RecipientPersonUniversal();
    template.addId(new RoleID().setNullFlavour(NullFlavour.NI.code)); // Non-standard null flavour used in example XML..
    template.setJobRoleName(JobRoleName._NR0260);
    template.setName(new PersonName("De Hopper"));
    template.setOrgId(new OrgID()
                .setID("V396F")
                .setType(OrgIDType.ODSOrgID.code));
    template.setOrgName("Dr De Hopper and Partners");
    return template;
  }
View Full Code Here

TOP

Related Classes of uk.nhs.interoperability.payloads.templates.RecipientPersonUniversal

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.