Package uk.nhs.interoperability.payloads

Examples of uk.nhs.interoperability.payloads.DateValue


public class ChildScreeningDocumentCreationHelper {

  public static ClinicalDocument createDocument(ChildScreeningFields childScreeningFields) throws MissingMandatoryFieldException {
    ClinicalDocument template = new ClinicalDocument();
    MissingMandatoryFieldException missingFields = new MissingMandatoryFieldException();
    DateValue currentDateTime = new DateValue(new Date(), DatePrecision.Minutes);
   
    // ==== We will assume some things and set them accordingly ====
    template.setDocumentId(CDAUUID.generateUUIDString());
    template.setConfidentialityCode(x_BasicConfidentialityKind._N);
   
View Full Code Here


  }
 
  public static EventNotification createNotification() throws Exception {
    EventNotification document;
    document = new EventNotification();
    document.setTime(new DateValue("20121127151500+0000"));
    document.setNotificationID("1A97FCE0-389F-11E2-81C1-0800200C9A66");
   
    // ********** ORIGINATING SYSTEM ********************************
    OriginatingSystem originator = new OriginatingSystem();
    originator.setSystemID(new SystemID()
                .setType(SystemIDType.LocalSystemID.code)
                .setAssigningOrganisation("RA8:St Elsewhere's Hospital")
                .setID("112YT"));
    originator.setOrgID(new OrgID()
                .setType(OrgIDType.ODSOrgID.code)
                .setID("RA8"));
    originator.setOrgName("St Elsewhere's Hospital");
    document.setOriginatingSystem(originator);

    // ********** EVENT *********************************************
    Event event = new Event();
    event.setEventID("1A97FCE1-389F-11E2-81C1-0800200C9A66");
    event.setEventTime(new DateValue("20121127130000+0000"));
    event.setEventType(NotificationEventType._01);
    event.setDocumentType(NotificationDocumentType._861421000000109);
    event.setDocumentFormat("text/xml");
    event.setDocumentProfileID("urn:nhs-en:profile:EndofLifeRecordCDADocument-v1-0");
    event.setEventSubtype(NotificationDocumentEvent._01);
    document.setEvent(event);   

    // ********** CONTACT PERSON ************************************
    ContactPerson contact = new ContactPerson();
    contact.setPersonAddress(new Address("St. Elsewhere's Hostpital,Leeds, LS13 6YP"));
    contact.setJobRoleName(JobRoleName._NR0050);
    contact.setTelephone("tel:01132111111");
    contact.setName(new PersonName("Dr. Smith"));
    contact.setOrgID(new OrgID(OrgIDType.ODSOrgID.code, "RA8"));
    contact.setOrgName("St. Elsewhere's Hospital");
    event.setContactPerson(contact);
   
    // ********** RECIPIENT *****************************************
    Recipient recipient = new Recipient();
    recipient.setRecipientAddress(new Address("St. Elsewhere's Practice, Leeds, LS1 4HY"));
    recipient.setJobRoleName(JobRoleName._NR0260);
    recipient.setTelephone("tel:01132111112");
    recipient.setOrgName("St. Elsewhere's Practice");
    document.addRecipient(recipient);
   
    // ********** PATIENT *********************************************
    Patient patient = new Patient();
    patient.setPatientAddress(new Address("111 St. Elsewhere's Street, Leeds, LS13 7TF"));
    patient.setPatientNhsNumber(new PatientID(PatientIDType.VerifiedNHSNumber.code, "1111111111"));
    patient.setPatientDOB(new DateValue("20010101"));
    patient.addPatientName(new PersonName("John Smith"));
    document.setPatient(patient);
    return document;
  }
View Full Code Here

    resource.addPatientName(new HumanName()
                  .setTitle("Mr")
                  .setGivenName("Mark")
                  .setFamilyName("Smith"));
    resource.setSex(Sex._1);
    resource.setBirthTime(new DateValue("19490101"));
   
    return resource;
  }
View Full Code Here

    // There is only one code in this vocab, so if the below is omitted, that code will still be used - however
    // we need to set it explicitly if we also want the code to include a cross-reference to a text section, as in this test
    template.setAnticipatoryMedicineBoxIssueCode(
          new CodedValue(EoLAnticipatoryMedicineBoxIssueSnCT._376201000000102, "#a4"));
   
    template.setTimeIssued(new DateValue("201209111400+0000"));
    template.setLocationOfBox("Bedside Table Drawer");
   
    return template;
  }
View Full Code Here

 
  public static AdvanceDecisionToRefuseTreatment createFull() {
    AdvanceDecisionToRefuseTreatment template = new AdvanceDecisionToRefuseTreatment();

    template.setID("C7E93500-28F8-11E2-B6B7-30966188709B");
    template.setEffectiveTime(new DateValue("201209111400+0000"));
    template.setADRTPreference(new CodedValue(EoLADRTprefSnCT._816301000000100, "#a2"));
    template.setADRTDocumentLocation("The signed copy of the documentation is available in patient bedside cabinet.");
    template.setADRTDiscussed(new CodedValue(ADRTDiscussedSnCT._820621000000107, "#a3"));
   
    return template;
View Full Code Here

    NewBornHearingScreening template = new NewBornHearingScreening();

    template.setId("A1265DB0-89B1-11E3-AFED-19F46188709B");
    template.setScreeningOutcome(NewBornHearingScreeningOutcomeSnCT._Clearresponsenofollowuprequired);
    template.setAudiologyTestFinding(AudiologyTestingOutcomeStatus._No);
    template.setAudiologyReferralTime(new DateValue("201409111400+0000"));
    return template;
  }
View Full Code Here

    template.addPatientName(new PersonName()
                  .setTitle("Mr")
                  .setGivenName("Mark")
                  .setFamilyName("Smith"));
    template.setSex(Sex._1);
    template.setBirthTime(new DateValue("19490101"));
   
    // Language
    LanguageCommunication language = new LanguageCommunication();
    language.setLanguage(HumanLanguage._en.code);
    language.setMode(LanguageAbilityMode._ESP);
View Full Code Here

public class EndOfLifeCareDocumentCreationHelper {

  public static ClinicalDocument createDocument(EndOfLifeCareISBFields isbFields) throws MissingMandatoryFieldException {
    ClinicalDocument template = new ClinicalDocument();
    MissingMandatoryFieldException missingFields = new MissingMandatoryFieldException();
    DateValue currentDateTime = new DateValue(new Date(), DatePrecision.Minutes);
   
    // ==== We will assume some things and set them accordingly ====
    template.setDocumentId(CDAUUID.generateUUIDString());
    template.setDocumentTitle("End of Life Care Coordination Summary");
    template.setConfidentialityCode(x_BasicConfidentialityKind._N);
View Full Code Here

 
  public static EoLCarePlan createFull() {
    EoLCarePlan template = new EoLCarePlan();

    template.setID("EBDF8AE8-28F5-11E2-9460-80936188709B");
    template.setEffectiveFrom(new DateValue("201209111400+0000"));
   
    template.setOriginalTimeAuthored(new DateValue("201209111400+0000"));
    AuthorPersonUniversal originalAuthor = new AuthorPersonUniversal();
    originalAuthor.addId(new PersonID()
                  .setID("201")
                  .setAssigningOrganisation("TAN01:NORTH EAST LINCOLNSHIRE CARE TRUST")
                  .setType(PersonIDType.LocalPersonID.code));
    originalAuthor.setJobRoleName(JobRoleName._NR2040);
    originalAuthor.setName(new PersonName()
                  .setTitle("Ms")
                  .setGivenName("Niral")
                  .setFamilyName("Singh"));
    originalAuthor.setOrganisationId(new OrgID()
                  .setID("V356F")
                  .setType(OrgIDType.ODSOrgID.code));
    originalAuthor.setOrganisationName("St James Hospital");
    template.setOriginalAuthor(originalAuthor);
   
    template.setLastAmendedTimeAuthored(new DateValue("201209111415+0000"));
    template.setLastAmendedAuthor(originalAuthor);

    template.setEoLToolSnCT(new CodedValue(EoLToolSnCT._818221000000103, "#a1"));
    template.setEOLToolStage("first stage");
    template.setPlannedReviewDate(new DateValue("20121011"));
   
    EOLPatientRelationships relationships = new EOLPatientRelationships();
    relationships.setRelationships(PatientRelationshipsTest.createFull());
   
    template.addPatientRelationships(new EOLPatientRelationships(PatientRelationshipsTest.createFull()));
View Full Code Here

 
  public static BloodSpotScreening createFull() {
    BloodSpotScreening template = new BloodSpotScreening();

    template.setId("2B6D3E28-3B0A-11E2-B7AF-B4F66183783C");
    template.setEffectiveTime(new DateValue("201209111400+0000"));
   
    // Performer
    template.setSampleCollectedTime(new DateValue("201209111300"));
    template.addPerformerPersonId(new PersonID().setNullFlavour(NullFlavour.Unknown.code));
    template.setPerformerPersonName(new PersonName("Mr", "Brian", "Weberly"));
    template.setPerformerOrgId(new OrgID()
                      .setID("A0991")
                      .setType(OrgIDType.ODSOrgID.code));
    template.setPerformerOrgName("St James Hospital");
   
    // Lab
    template.setTimeReceivedAtLab(new DateValue("201209111310"));
    template.setLabOrganisationId(new OrgID()
                      .setID("A0078")
                      .setType(OrgIDType.ODSOrgID.code));
    template.setLabOrganisationDescription("St James Pathology Laboratory");
   
View Full Code Here

TOP

Related Classes of uk.nhs.interoperability.payloads.DateValue

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.