Examples of PatientRelationshipParticipantRole


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

  public static PatientRelationships createRelatedPersons() {
    PatientRelationships template = new PatientRelationships();
   
     template.setID("EF0C2E84-2A89-11E2-A57D-D9CB6088709B");
    
     PatientRelationshipParticipantRole rp = new PatientRelationshipParticipantRole();
     rp.setPersonRole(JobRoleName._NR1980);
     rp.setAddress(new Address().setNullFlavour(NullFlavour.NI.code));
     rp.addTelephoneNumber(new Telecom("tel:014722823451"));
     rp.addTelephoneNumber(new Telecom("tel:07831191333"));
     rp.setPersonName(new PersonName()
                 .setTitle("Mrs")
                 .setGivenName("Emily")
                 .setFamilyName("Smith"));
     template.addRelatedPerson(new RelatedPersonDetails().setParticipant(rp));
   
     PatientRelationshipParticipantRole rp2 = new PatientRelationshipParticipantRole();
     rp2.setPersonRole(JobRoleName._NR1990);
     rp2.setAssociatedJobRole(JobRoleName._NR2040);
     rp2.setAddress(new Address().setNullFlavour(NullFlavour.NI.code));
     rp2.addTelephoneNumber(new Telecom("tel:07833825701"));
     rp2.setPersonName(new PersonName()
                 .setTitle("Ms")
                 .setGivenName("Niral")
                 .setFamilyName("Singh"));
     template.addRelatedPerson(new RelatedPersonDetails().setParticipant(rp2));
    
     PatientRelationshipParticipantRole rp3 = new PatientRelationshipParticipantRole();
     rp3.setPersonRole(JobRoleName._NR2000);
     rp3.setAddress(new Address().setNullFlavour(NullFlavour.NI.code));
     rp3.addTelephoneNumber(new Telecom("tel:07822761939"));
     rp3.setPersonName(new PersonName()
                 .setTitle("Ms")
                 .setGivenName("Gemma")
                 .setFamilyName("Hopkins"));
     template.addRelatedPerson(new RelatedPersonDetails().setParticipant(rp3));

     PatientRelationshipParticipantRole rp4 = new PatientRelationshipParticipantRole();
     rp4.setPersonRole(JobRoleName._NR2010);
     rp4.setAddress(new Address().setNullFlavour(NullFlavour.NI.code));
     rp4.addTelephoneNumber(new Telecom("tel:07871715735"));
     rp4.setPersonName(new PersonName()
                 .setTitle("Mr")
                 .setGivenName("Alan")
                 .setFamilyName("Smith"));
     template.addRelatedPerson(new RelatedPersonDetails().setParticipant(rp4));

     PatientRelationshipParticipantRole rp5 = new PatientRelationshipParticipantRole();
     rp5.addID(new PersonID()
             .setID("110")
             .setAssigningOrganisation("TAN01:NORTH EAST LINCOLNSHIRE CARE TRUST")
             .setType(PersonIDType.LocalPersonID.code));
     rp5.setPersonRole(JobRoleName._NR2020);
     rp5.setAssociatedJobRole(JobRoleName._NR2050);
     rp5.setAddress(new Address()
                 .addAddressLine("St James Hospital")
                 .addAddressLine("Potter Street")
                 .addAddressLine("Grimsby")
                 .setPostcode("DN3 6AA")
                 .setAddressUse(AddressType.WorkPlace.code));
     rp5.addTelephoneNumber(new Telecom("tel:07334345612"));
     rp5.setPersonName(new PersonName()
                 .setTitle("Mrs")
                 .setGivenName("Isabella")
                 .setFamilyName("Hopkins"));
     rp5.setOrgId(new OrgID()
               .setID("V356F")
               .setType(OrgIDType.ODSOrgID.code));
     rp5.setOrgDescription("St James Hospital");
     template.addRelatedPerson(new RelatedPersonDetails().setParticipant(rp5));

     PatientRelationshipParticipantRole rp6 = new PatientRelationshipParticipantRole();
     rp6.addID(new PersonID()
      .setID("112")
      .setAssigningOrganisation("TAN01:NORTH EAST LINCOLNSHIRE CARE TRUST")
      .setType(PersonIDType.LocalPersonID.code));
     rp6.setPersonRole(JobRoleName._NR2030);
     rp6.setAssociatedJobRole(JobRoleName._NR0260);
     rp6.setAddress(new Address()
                 .addAddressLine("Freshney Green PCC")
                 .addAddressLine("Carlton Court")
                 .addAddressLine("Martin Road")
                 .addAddressLine("Grimsby")
                 .setPostcode("DN34 4GB")
                 .setAddressUse(AddressType.WorkPlace.code));
     rp6.addTelephoneNumber(new Telecom("tel:07621846951"));
     rp6.setPersonName(new PersonName()
                 .setTitle("Dr")
                 .setGivenName("John")
                 .setFamilyName("Manning"));
     rp6.setOrgId(new OrgID()
               .setID("V365F")
               .setType(OrgIDType.ODSOrgID.code));
     rp6.setOrgDescription("Freshney Green PCC");
     template.addRelatedPerson(new RelatedPersonDetails().setParticipant(rp6));
    return template;
  }
View Full Code Here

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

    List<EndOfLifeCareDocumentFormalCarer> formalCarers = new ArrayList<EndOfLifeCareDocumentFormalCarer>();
   
    for (EOLPatientRelationships relationshipList : relationships) {
      for (RelatedPersonDetails personDetails : relationshipList.getRelationships().getRelatedPerson()) {
       
        PatientRelationshipParticipantRole person = personDetails.getParticipant();
       
        if (person.getPersonRole() != null) {
          JobRoleName role = (JobRoleName)HelperUtils.safelyMapCodedValueToVocabEntry(
            person.getPersonRole(), JobRoleName._NR0010, "RelatedPersonJobRole", parseExceptions, true);
         
          JobRoleName associatedRole = null;
          if (person.getAssociatedJobRole() != null) {
            associatedRole = (JobRoleName)HelperUtils.safelyMapCodedValueToVocabEntry(
              person.getAssociatedJobRole(), JobRoleName._NR0010, "RelatedPersonAssociatedJobRole", parseExceptions, true);
          }
       
          // Main informal carer (name, tel)
          if (role.sameAs(JobRoleName._MainInformalCarer)) {
            fields.setMainInformalCarerName(person.getPersonName());
            fields.setMainInformalCarerTel(TemplateParsingHelper.getTel(person, "MainInformalCarerTel"));
          }
         
          // Usual GP (name, practice id, practice name, address, tel, fax)
          else if (role.sameAs(JobRoleName._GeneralMedicalPractitioner)) {
            fields.setUsualGPName(person.getPersonName());
            fields.setUsualGPTelephone(TemplateParsingHelper.getTel(person, "UsualGPTelephone"));
            fields.setUsualGPFax(TemplateParsingHelper.getFax(person, "UsualGPFax"));
            fields.setUsualGPAddress(TemplateParsingHelper.getAddress(person));
            fields.setUsualGPODSCode(TemplateParsingHelper.getODSID(person, "UsualGPODSCode", parseExceptions));
            fields.setUsualGPOrgName(TemplateParsingHelper.getOrgName(person));
          }
         
          // Key Worker (id, name, role, org id, org name, address, tel)
          else if (role.sameAs(JobRoleName._KeyWorker)) {
            fields.setKeyWorkerName(person.getPersonName());
            fields.setKeyWorkerSDSID(TemplateParsingHelper.getSDSID(person, "KeyWorkerID", parseExceptions));
            fields.setKeyWorkerTelephone(TemplateParsingHelper.getTel(person, "KeyWorkerTelephone"));
            fields.setKeyWorkerAddress(TemplateParsingHelper.getAddress(person));
            fields.setKeyWorkerOrgID(TemplateParsingHelper.getODSID(person, "KeyWorkerOrgID", parseExceptions));
            fields.setKeyWorkerOrgName(TemplateParsingHelper.getOrgName(person));
            fields.setKeyWorkerJobRole(associatedRole);
          }
         
          // Formal Carers 0..N (name, role, tel)
          else if (role.sameAs(JobRoleName._FormalCarer)) {
            EndOfLifeCareDocumentFormalCarer carerentry = new EndOfLifeCareDocumentFormalCarer();
            carerentry.setName(person.getPersonName());
            carerentry.setTelephone(TemplateParsingHelper.getTel(person, "FormalCarerTelephone"));
            carerentry.setRole(associatedRole);
            formalCarers.add(carerentry);
          }

          // Lasting power of attorney (name, tel)
          // We only need to populate this if it hasn't already been populated from
          // the actual LPA section in the document (which it should have been!)
          else if (role.sameAs(JobRoleName._LPAwithauthority)) {
            if (fields.getLPAName() == null) {
              fields.setLPAName(person.getPersonName());
            }
            if (fields.getLPATelephone() == null) {
              fields.setLPATelephone(TemplateParsingHelper.getTel(person, "LPATelephone"));
            }
          }
         
          // Additional person to involve in decisions (name, tel)
          else if (role.sameAs(JobRoleName._Additionalpersontobeinvolvedindecisions)) {
            if (fields.getAdditionalPersonToInvolve() != null && fields.getAdditionalPersonToInvolve2() != null) {
              // We already appear to have two additional people, so we will have to assum this
              // is a third one, and ignore it
            } else if (fields.getAdditionalPersonToInvolve() == null) {
              // First additional person to involve in decisions (name, tel)
              fields.setAdditionalPersonToInvolve(person.getPersonName());
              fields.setAdditionalPersonToInvolveTel(TemplateParsingHelper.getTel(person, "AdditionalPersonToInvolveTel"));
            } else {
              // Second additional person to involve in decisions (name, tel)
              fields.setAdditionalPersonToInvolve2(person.getPersonName());
              fields.setAdditionalPersonToInvolve2Tel(TemplateParsingHelper.getTel(person, "AdditionalPersonToInvolve2Tel"));
            }
          }
         
          // Senior Responsible Clinician (name, id, role, org name, org id, add, tel)
          // We only need to populate this if it hasn't already been populated from as the author
          // of the DNACPR section in the document (which it may have been if there is a DNACPR decision recorded)
          else if (role.sameAs(JobRoleName._SeniorResponsibleClinician)) {
            fields.setSeniorResponsibleClinicianName(person.getPersonName());
            fields.setSeniorResponsibleClinicianSDSID(TemplateParsingHelper.getSDSID(person, "SeniorResponsibleClinicianSDSID", parseExceptions));
            fields.setSeniorResponsibleClinicianTelephone(TemplateParsingHelper.getTel(person, "SeniorResponsibleClinicianTelephone"));
            fields.setSeniorResponsibleClinicianAddress(TemplateParsingHelper.getAddress(person));
            fields.setSeniorResponsibleClinicianORGID(TemplateParsingHelper.getODSID(person, "SeniorResponsibleClinicianORGID", parseExceptions));
            fields.setSeniorResponsibleClinicianORGName(TemplateParsingHelper.getOrgName(person));
View Full Code Here

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

   
    template.setID("369FBB7A-2A86-11E2-B118-84C76088709B");
    template.setEffectiveTime(new DateValue("201209111400+0000"));
    template.setPrognosisAwareness(new CodedValue(PrognosisAwarenessSnCT._751941000000100, "#a6"));
    // Main informal carer
    PatientRelationshipParticipantRole carer = new PatientRelationshipParticipantRole();
    carer.setPersonRole(JobRoleName._NR1980);
    carer.setAddress(new Address().setNullFlavour(NullFlavour.NI.code));
    // Note: The DMS specifies that if the person's ID is not known, an "NA" null flavour should
    // be used. In the example XML however, a null flavour of "NI" is used, which is why we need
    // to explicitly set that here.
    carer.addID(new PersonID().setNullFlavour(NullFlavour.NI.code));
    carer.addTelephoneNumber(new Telecom("tel:014722823451"));
    carer.addTelephoneNumber(new Telecom("tel:07831191333"));
    carer.setPersonName(new PersonName()
                  .setTitle("Mrs")
                  .setGivenName("Emily")
                  .setFamilyName("Smith"));
    template.setMainInformalCarer(carer);
    return template;
View Full Code Here

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

        aware.getPrognosisAwareness(), PrognosisAwarenessSnCT._711951000000105,
        "MainInformalCarerAwareOfPrognosis", parseExceptions, false);
    fields.setMainInformalCarerAwareOfPrognosis(awareOfPrognosis);
       
    // Main informal carer (name, tel)
    PatientRelationshipParticipantRole mic = aware.getMainInformalCarer();
     //mic.setPersonRole(JobRoleName._NR1980);
     //mic.setPersonName(isbFields.getMainInformalCarerName());
    
     //if (isbFields.getMainInformalCarerTel() != null) {
     //}
View Full Code Here

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

    AuthoritytoLastingPowerofAttorney template = new AuthoritytoLastingPowerofAttorney();
    template.setID("26919440-2A88-11E2-A205-1ECA6088709B");
    template.setEffectiveTime(new DateValue("201209111400+0000"));
    template.setAuthoritytoLPA(new CodedValue(AuthoritytoLPASnCT._816381000000105, "#a7"));
   
    PatientRelationshipParticipantRole person = new PatientRelationshipParticipantRole();
    person.setPersonRole(JobRoleName._NR2010);
    person.setAddress(new Address().setNullFlavour(NullFlavour.NI.code));
    person.addTelephoneNumber(new Telecom("tel:07871715735"));
    person.setPersonName(new PersonName()
                  .setTitle("Mr")
                  .setGivenName("Alan")
                  .setFamilyName("Smith"));
    template.setLPADetails(person);
    return template;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.