Package uk.nhs.interoperability.payloads

Examples of uk.nhs.interoperability.payloads.DateValue


    /*
     Field name: recipients, Message: At least one recipient must be provided
     */
   
    fields.setPatientName(new PersonName("Mr", "Mark", "Smith"));
    fields.setPatientBirthDate(new DateValue("19490101"));
    fields.setPatientGender(Sex._Male);
    fields.setPatientNHSNo("993254128");
    fields.setPatientNHSNoIsTraced(false);
    fields.setPatientAddress(new Address()
                    .addAddressLine("17, County Court")
View Full Code Here


    return fields;
  }
 
  public static NonCodedCDACommonFields createFull() {
    NonCodedCDACommonFields fields = createMinimal();
    DateValue currentDate = new DateValue(new Date(), DatePrecision.Minutes);
   
    // Now add all the other fields...
    fields.setDocumentEffectiveTime(currentDate);
    fields.setDocumentSetID(CDAUUID.generateUUIDString());
    fields.setDocumentVersionNumber(1);
   
    // Patient
    fields.setPatientTelephone("0123456789");
    fields.setPatientMobile("0723456789");
    fields.setUsualGPTelephone("01111111122");
    fields.setUsualGPFax("02221111122");
    fields.setUsualGPAddress(new Address()
                    .addAddressLine("Springer Street")
                    .addAddressLine("Medway")
                    .setPostcode("ME5 5TY")
                    .setAddressUse(AddressType.WorkPlace.code));
    // Author
    fields.setTimeAuthored(currentDate);
    fields.setDocumentAuthorAddress(new Address()
                    .addAddressLine("Springer Street")
                    .addAddressLine("Medway")
                    .setPostcode("ME5 5TY")
                    .setAddressUse(AddressType.WorkPlace.code));
    fields.setDocumentAuthorSDSID("200025166218");
    fields.setDocumentAuthorTelephone("01133339999");
    // Data Enterer
    fields.setDataEntererName(new PersonName("Mr", "Simon", "Smith"));
    fields.setDataEntererSDSID("200025166218");
    fields.setDataEntererSDSRoleID("260045146218");
    // Recipient
    DocumentRecipient recipient = fields.getRecipients().get(0);
    recipient.setRecipientAddress(new Address()
                      .addAddressLine("Springer Street")
                      .addAddressLine("Medway")
                      .setPostcode("ME5 5TY")
                      .setAddressUse(AddressType.WorkPlace.code));
    recipient.setRecipientTelephone("02078884343");
    recipient.setRecipientJobRole(JobRoleName._Architect);
    // Copy Recipients
    DocumentRecipient copyRecipient = new DocumentRecipient();
    copyRecipient.setRecipientName(new PersonName("Mrs", "Jane", "Jameson"));
    copyRecipient.setRecipientODSCode("V396A");
    copyRecipient.setRecipientOrganisationName("Medway PCT");
    copyRecipient.setRecipientAddress(new Address()
                      .addAddressLine("Springer Street")
                      .addAddressLine("Medway")
                      .setPostcode("ME5 5TY")
                      .setAddressUse(AddressType.WorkPlace.code));
    copyRecipient.setRecipientJobRole(JobRoleName._ArtTherapist);
    copyRecipient.setRecipientSDSID("298745463789");
    copyRecipient.setRecipientSDSRoleID("298745111111");
    copyRecipient.setRecipientTelephone("01127756435");
    fields.addCopyRecipient(copyRecipient);
    // Second Copy Recipient
    DocumentRecipient copyRecipient2 = copyRecipient.clone();
    copyRecipient2.setRecipientName(new PersonName("Ms", "Janet", "Jameson"));
    fields.addCopyRecipient(copyRecipient2);
    // Authenticator
    fields.setAuthenticatorName(new PersonName("Mr", "Bob", "Bobson"));
    fields.setAuthenticatorSDSID("233332243124");
    fields.setAuthenticatorSDSRoleID("222222243124");
    fields.setAuthenticatedTime(currentDate);
    // Participant
    NonCodedCDAParticipant participant = new NonCodedCDAParticipant();
    participant.setParticipantName(new PersonName("Mr", "Peter", "Peterson"));
    participant.setParticipantAddress(new Address()
                      .addAddressLine("Springer Street")
                      .addAddressLine("Medway")
                      .setPostcode("ME5 5TY")
                      .setAddressUse(AddressType.WorkPlace.code));
    participant.setParticipantODSCode("V396A");
    participant.setParticipantOrganisationName("Medway PCT");
    participant.setParticipantSDSID("222222888855");
    participant.setParticipantSDSRoleID("222211100496");
    participant.setParticipantTelephone("01145589403");
    participant.setParticipantType(ParticipationType._Consultant);
    fields.addParticipant(participant);
    // Documentation Of
    fields.setEventCode(new CodedValue("73761001","colonoscopy","2.16.840.1.113883.2.1.3.2.4.15"));
    fields.setEventType(HL7ActType.Procedure);
    fields.setEventEffectiveFromTime(new DateValue("201105192000+01"));
    fields.setEventEffectiveToTime(new DateValue("201105192045+01"));
    fields.setEventPerformerName(new PersonName("Mr","Adam","Adamson"));
    fields.setEventODSCode("V396A");
    fields.setEventOrganisatioName("Medway PCT");
    // Consent
    fields.setConsent(DocumentConsentSnCT._Consentgivenforelectronicrecordsharing);
    // Encounter
    fields.setEncounterFromTime(new DateValue("201105192000+01"));
    fields.setEncounterToTime(new DateValue("201105192045+01"));
    fields.setEncounterType(new CodedValue("11429006", "Consultation", "2.16.840.1.113883.2.1.3.2.4.15"));
    fields.setEncounterLocationType(new CodedValue("313161000000107", "Example Care Setting", "2.16.840.1.113883.2.1.3.2.4.15"));
    fields.setEncounterLocationName("Springer Street Surgery");
    fields.setEncounterLocationAddress(new Address()
                          .addAddressLine("Springer Street")
View Full Code Here

 
  public static ClinicalDocument createDocument(NonCodedCDACommonFields commonFields) 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 ClinicalDocument createChildScreeningExample() {
    ClinicalDocument template = new ClinicalDocument();
   
    // ==== Set the basic document information ====
    template.setDocumentId("A570ED3C-3D67-11E2-9389-A28C6188709B");
    template.setEffectiveTime(new DateValue("201209111400+0000"));
    template.setConfidentialityCode(x_BasicConfidentialityKind._N);
    template.setDocumentSetId("B8275470-3D67-11E2-B9D6-A68C6188709B");
    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);
    // Custodian
    CustodianOrganizationUniversal custodian = createCustodian();
    template.setCustodianOrganisation(custodian);
View Full Code Here

                .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")
View Full Code Here

  }
 
  public static BloodSpotScreening createBloodSpotScreening() {
    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

  }
 
  public static NewBornBirthDetails createNewBornBirthDetails() {
    NewBornBirthDetails template = new NewBornBirthDetails();
    template.setId("A1265DB0-89B1-11E3-AFED-19F46188709B");
    template.setEffectiveTime(new DateValue("201209111400+0000"));
    template.setGestationalAgeInWeeks("40");
    template.setBirthOrder("01");
    template.setNoOfFoetusInConfinement("1");
    template.setBirthWeightInGrams("2887");
    return template;
View Full Code Here

   
    // ==== Set the basic document information ====
    template.setDocumentId("A709A442-3CF4-476E-8377-376500E829C9");
    template.setDocumentTitle("Report");
    template.setDocumentType(Documenttype._Report);
    template.setEffectiveTime(new DateValue("201105192000+01"));
    template.setConfidentialityCode(x_BasicConfidentialityKind._V);
    template.setDocumentSetId("411910CF-1A76-4330-98FE-C345DDEE5553");
    template.setDocumentVersionNumber("1");
   
    // ==== Now, set the "left hand side" values in the document ====
   
    // Patient
    template.setPatient(createPatient());
    // Author
    template.setTimeAuthored(new DateValue("201105192000+01"));
    template.setAuthor(createAuthorMaryJones());
    // Data Enterer
    template.setDataEnterer(createDataEnterer());
    // Informant
    template.addInformant(new DocumentInformant(createInformant()));
    // Custodian
    template.setCustodianOrganisation(createCustodian());
    // Recipients
    template.addPrimaryRecipients(new PrimaryRecipient(createRecipient()));
    template.addInformationOnlyRecipients(new InformationOnlyRecipient(createCopyRecipient()));
    // Authenticator
    template.setAuthenticator(createAuthenticator());
    template.setTimeAuthenticated(new DateValue("201105192015+01"));

    // Participant (Consultant)
    DocumentParticipant consultant = new DocumentParticipant();
    consultant.setParticipant(createParticipantConsultant());
    consultant.setParticipantTypeCode(ParticipationType._Consultant.code);
View Full Code Here

    template.addPatientName(new PersonName()
                  .setTitle("Mr")
                  .setGivenName("Mark")
                  .setFamilyName("Smith"));
    template.setSex(Sex._Male);
    template.setBirthTime(new DateValue("19490101"));
    // Language
    LanguageCommunication language = new LanguageCommunication();
    language.setLanguage(HumanLanguage._en.code);
    template.addLanguages(language);
    // Organisation - Registered GP:
View Full Code Here

   
    template.setId("8371D2F1-123F-4A14-A1AC-C6C8023103CF");
    template.setClassCode(HL7ActType.Procedure.code);
    template.setEventCode(new CodedValue("73761001","colonoscopy","2.16.840.1.113883.2.1.3.2.4.15"));
    template.setEffectiveTime(
              new DateRange(new DateValue("201105192000+01"),
                      new DateValue("201105192045+01")));
   
    // Performer
    PersonWithOrganizationUniversal performer = new PersonWithOrganizationUniversal();
    performer.addPersonId(new PersonID()
                  .setNullFlavour(NullFlavour.NI.code));
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.