Examples of ChildPatientUniversal


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

    template.setDocumentVersionNumber(String.valueOf(childScreeningFields.getDocumentVersionNumber()));
   
   
    // Child Patient
    try {
      ChildPatientUniversal patient = createPatient(childScreeningFields);
      template.setChildPatient(patient);
    } catch (MissingMandatoryFieldException e) {
      missingFields.addMissingFields(e);
    }
   
View Full Code Here

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

      if (!providerOrganisationType) {
        missingFields.addMissingField("ProviderOrganisationType", "When a provider organisation is specified for a child patient, a provider org type must be included");
      }
    }
   
    ChildPatientUniversal template = new ChildPatientUniversal();
   
    String idType = null;
    if (fields.getPatientNHSNoTraceStatus().sameAs(NHSNumberTraceStatus.Traced)) {
      idType = PatientIDType.VerifiedNHSNumber.code;
    } else {
      idType = PatientIDType.UnverifiedNHSNumber.code;
    }
   
    template.addPatientID(new PatientIDWithTraceStatuses()
                .setPatientID(fields.getPatientNHSNo())
                .setPatientIDType(idType)
                .setNHSNoTraceStatus(fields.getPatientNHSNoTraceStatus().code));
   
    if (fields.getPatientAddress() != null) {
      template.addAddress(fields.getPatientAddress());
    }
    template.addName(fields.getPatientName());
    template.setGender(fields.getPatientGender());
    template.setDateOfBirth(fields.getPatientBirthDate());
   
    // Guardian
    if (guardian) {
      Guardian guardianFields = new Guardian();
     
      String guardianIdType = null;
      if (fields.getGuardianNHSNoTraceStatus().sameAs(NHSNumberTraceStatus.Traced)) {
        guardianIdType = PatientIDType.VerifiedNHSNumber.code;
      } else {
        guardianIdType = PatientIDType.UnverifiedNHSNumber.code;
      }
      guardianFields.addId(new PatientIDWithTraceStatuses()
                    .setPatientID(fields.getGuardianNHSNo())
                    .setPatientIDType(guardianIdType)
                    .setNHSNoTraceStatus(fields.getGuardianNHSNoTraceStatus().code));
      guardianFields.setGuardianDetails(new GuardianPerson().setGuardianName(fields.getGuardianName()));
      guardianFields.setRole(fields.getGuardianRole());
     
      if (guardianAddress) {
        guardianFields.addAddress(fields.getGuardianAddress());
      }
      if (guardianTelephone) {
        guardianFields.addTelephoneNumber(new Telecom()
                      .setTelecom("tel:" + fields.getGuardianTelephone())
                      .setTelecomType(TelecomUseType.HomeAddress.code));
      }
      template.addGuardian(guardianFields);
    }
   
    // Provider Organisation
    if (provider) {
       template.setOrganisationId(new OrgID(OrgIDType.ODSOrgID.code, fields.getProviderOrganisationODSID()));
      template.setOrganisationName(fields.getProviderOrganisation());
      template.setOrganisationType(fields.getProviderOrganisationType());
     
      if (providerOrganisationTelephone) {
        template.addOrganisationTelephone(new Telecom()
                          .setTelecom("tel:" + fields.getProviderOrganisationTelephone())
                          .setTelecomType(TelecomUseType.WorkPlace.code));
      }
     
      if (providerOrganisationAddress) {
        template.setOrganisationAddress(fields.getProviderOrganisationAddress());
      }
     
      if (providerParentOrganisationODSID) {
        template.addOrganisationPartOf(new ChildPatientOrganisationPartOf()
                          .addOrganisationId(new OrgID(OrgIDType.ODSOrgID.code,
                                          fields.getProviderParentOrganisationODSID())));
      }
    }
    return template;
View Full Code Here

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

    template.setDocumentVersionNumber("1");
   
    // ==== Now, set the "left hand side" values in the document ====
   
    // Patient
    ChildPatientUniversal patient = createPatient();
    template.setChildPatient(patient);
    // Author
    template.setTimeAuthored(new DateValue("201209111400+0000"));
    AuthorPersonUniversal author = createAuthorNiralSingh();
    template.setAuthor(author);
View Full Code Here

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

    template.addTextSections(new TextSections(createTextSection3()));
    return template;
  }
 
  public static ChildPatientUniversal createPatient() {
    ChildPatientUniversal template = new ChildPatientUniversal();
    template.addPatientID(new PatientIDWithTraceStatuses()
                .setPatientID("K12345")
                .setAssigningOrganisation("V396A:Medway PCT")
                .setPatientIDType(PatientIDType.LocalID.code));
    template.addPatientID(new PatientIDWithTraceStatuses()
                .setPatientID("9932541280")
                .setNHSNoTraceStatus(NHSNumberTraceStatus.TraceNeedsToBeResolved.code)
                .setPatientIDType(PatientIDType.UnverifiedNHSNumber.code));
    template.addAddress(new Address()
                .setAddressUse(AddressType.Home.code)
                .addAddressLine("Appleton House")
                .addAddressLine("Lanchester Road")
                .addAddressLine("Grimsby")
                .setPostcode("DN3 1UJ"));
    template.addName(new PersonName()
                .setGivenName("Mark")
                .setFamilyName("Smith"));
    template.setGender(Sex._Male);
    template.setDateOfBirth(new DateValue("20120728"));
   
    // Guardian
    Guardian guardian = new Guardian();
    guardian.addId(new PatientIDWithTraceStatuses()
                  .setPatientID("K12344")
                  .setPatientIDType(PatientIDType.LocalID.code)
                  .setAssigningOrganisation("V396A:Medway PCT"));
    guardian.addId(new PatientIDWithTraceStatuses()
                  .setPatientID("993254127")
                  .setPatientIDType(PatientIDType.VerifiedNHSNumber.code)
                  .setNHSNoTraceStatus(NHSNumberTraceStatus.Traced.code));
    guardian.setRole(GuardianRoleType._Mother);
    guardian.addAddress(new Address()
                  .setAddressUse(AddressType.Home.code)
                  .addAddressLine("Appleton House")
                  .addAddressLine("Lanchester Road")
                  .addAddressLine("Grimsby")
                  .setPostcode("DN3 1UJ"));
    guardian.addTelephoneNumber(new Telecom()
                    .setTelecom("tel:01634111678")
                    .setTelecomType(TelecomUseType.HomeAddress.code));   
    guardian.setGuardianDetails(new GuardianPerson()
                      .setGuardianName(new PersonName("Mrs", "Shelly", "Smith")));
    template.addGuardian(guardian);
   
    // Provider Organisation
    template.setOrganisationId(new OrgID().setID("V396F"));
    template.setOrganisationName("Dr De Hopper and Partners");
    template.addOrganisationTelephone(new Telecom()
                        .setTelecom("tel:01634111222")
                        .setTelecomType(TelecomUseType.WorkPlace.code));
    template.setOrganisationAddress(new Address()
                      .addAddressLine("Freshney Green PCC")
                      .addAddressLine("Grimsby")
                      .setPostcode("DN34 4GB")
                      .setAddressUse(AddressType.WorkPlace.code));
    template.setOrganisationType(CDAOrganizationProviderType._GPPractice);
    template.addOrganisationPartOf(new ChildPatientOrganisationPartOf()
                        .addOrganisationId(new OrgID(OrgIDType.ODSOrgID.code, "V396G")));
   
    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.