Search in sources :

Example 1 with Schedule

use of org.hl7.fhir.r4.model.Schedule in project beneficiary-fhir-data by CMSgov.

the class SNFClaimTransformerV2Test method shouldHaveClmIpAdmsnTypeCdSupInfo.

@Test
public void shouldHaveClmIpAdmsnTypeCdSupInfo() {
    SupportingInformationComponent sic = TransformerTestUtilsV2.findSupportingInfoByCode("https://bluebutton.cms.gov/resources/variables/clm_ip_admsn_type_cd", eob.getSupportingInfo());
    SupportingInformationComponent compare = TransformerTestUtilsV2.createSupportingInfo(// We don't care what the sequence number is here
    sic.getSequence(), // Category
    Arrays.asList(new Coding("http://terminology.hl7.org/CodeSystem/claiminformationcategory", "info", "Information"), new Coding("https://bluebutton.cms.gov/resources/codesystem/information", "https://bluebutton.cms.gov/resources/variables/clm_ip_admsn_type_cd", "Claim Inpatient Admission Type Code")), // Code
    new Coding("https://bluebutton.cms.gov/resources/variables/clm_ip_admsn_type_cd", "3", "Elective - The patient's condition permitted adequate time to schedule the availability of suitable accommodations."));
    assertTrue(compare.equalsDeep(sic));
}
Also used : SupportingInformationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent) Coding(org.hl7.fhir.r4.model.Coding) Test(org.junit.jupiter.api.Test)

Example 2 with Schedule

use of org.hl7.fhir.r4.model.Schedule in project elexis-server by elexis.

the class AppointmentTest method testSearchByDateParamsAndSlot.

// FIX ME
@Ignore
@Test
public void testSearchByDateParamsAndSlot() {
    // http://localhost:8380/fhir/Schedule/5495888f8aae05023409b5cf853bbbce Praxis
    Bundle results = client.search().forResource(Appointment.class).where(Appointment.DATE.afterOrEquals().day("2016-12-01")).and(Appointment.DATE.before().day("2016-12-30")).and(Appointment.ACTOR.hasId("Schedule/68a891b86923dd1740345627dbb92c9f")).returnBundle(Bundle.class).execute();
    assertEquals(2, results.getEntry().size());
    for (BundleEntryComponent entry : results.getEntry()) {
        Appointment appointment = (Appointment) entry.getResource();
        assertTrue(appointment.getParticipant().get(0).getActor().getReference().startsWith("Patient/"));
        assertNull(appointment.getParticipant().get(0).getActorTarget());
    }
}
Also used : Appointment(org.hl7.fhir.r4.model.Appointment) BundleEntryComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryComponent) Bundle(org.hl7.fhir.r4.model.Bundle) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 3 with Schedule

use of org.hl7.fhir.r4.model.Schedule in project elexis-server by elexis.

the class AppointmentTest method testDirectLoadAppointmentInContactAssignedArea.

@Test
public void testDirectLoadAppointmentInContactAssignedArea() {
    Appointment appointment = client.read().resource(Appointment.class).withId("Af322a333db4daf37093177").execute();
    assertNotNull(appointment);
    assertEquals(1484116200000l, appointment.getStart().getTime());
    assertEquals(1484121600000l, appointment.getEnd().getTime());
    assertEquals(90, appointment.getMinutesDuration());
    List<AppointmentParticipantComponent> participants = appointment.getParticipant();
    assertEquals(1, participants.size());
    assertEquals(ParticipantRequired.REQUIRED, participants.get(0).getRequired());
    Practitioner practitioner = client.read().resource(Practitioner.class).withId(participants.get(0).getActor().getReferenceElement()).execute();
    assertNotNull(practitioner);
    assertEquals("Nachname", practitioner.getName().get(0).getFamily());
    List<Reference> slotReference = appointment.getSlot();
    assertNotNull(slotReference);
    Slot slot = client.read().resource(Slot.class).withId(slotReference.get(0).getReferenceElement()).execute();
    assertNotNull(slot);
    assertEquals(SlotStatus.BUSY, slot.getStatus());
    Schedule schedule = client.read().resource(Schedule.class).withId(slot.getSchedule().getReferenceElement()).execute();
    assertNotNull(schedule);
// practitioner = client.read().resource(Practitioner.class)
// .withId(schedule.getActor().get(0).getReferenceElement()).execute();
// assertEquals("Nachname", practitioner.getName().get(0).getFamily());
}
Also used : Appointment(org.hl7.fhir.r4.model.Appointment) Practitioner(org.hl7.fhir.r4.model.Practitioner) AppointmentParticipantComponent(org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent) Reference(org.hl7.fhir.r4.model.Reference) Schedule(org.hl7.fhir.r4.model.Schedule) Slot(org.hl7.fhir.r4.model.Slot) Test(org.junit.Test)

Example 4 with Schedule

use of org.hl7.fhir.r4.model.Schedule in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeSchedule.

protected void composeSchedule(Complex parent, String parentType, String name, Schedule element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "Schedule", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "Schedule", "identifier", element.getIdentifier().get(i), i);
    if (element.hasActiveElement())
        composeBoolean(t, "Schedule", "active", element.getActiveElement(), -1);
    if (element.hasServiceCategory())
        composeCodeableConcept(t, "Schedule", "serviceCategory", element.getServiceCategory(), -1);
    for (int i = 0; i < element.getServiceType().size(); i++) composeCodeableConcept(t, "Schedule", "serviceType", element.getServiceType().get(i), i);
    for (int i = 0; i < element.getSpecialty().size(); i++) composeCodeableConcept(t, "Schedule", "specialty", element.getSpecialty().get(i), i);
    for (int i = 0; i < element.getActor().size(); i++) composeReference(t, "Schedule", "actor", element.getActor().get(i), i);
    if (element.hasPlanningHorizon())
        composePeriod(t, "Schedule", "planningHorizon", element.getPlanningHorizon(), -1);
    if (element.hasCommentElement())
        composeString(t, "Schedule", "comment", element.getCommentElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 5 with Schedule

use of org.hl7.fhir.r4.model.Schedule in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeNutritionOrderNutritionOrderOralDietComponent.

protected void composeNutritionOrderNutritionOrderOralDietComponent(Complex parent, String parentType, String name, NutritionOrder.NutritionOrderOralDietComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "oralDiet", name, element, index);
    for (int i = 0; i < element.getType().size(); i++) composeCodeableConcept(t, "NutritionOrder", "type", element.getType().get(i), i);
    for (int i = 0; i < element.getSchedule().size(); i++) composeTiming(t, "NutritionOrder", "schedule", element.getSchedule().get(i), i);
    for (int i = 0; i < element.getNutrient().size(); i++) composeNutritionOrderNutritionOrderOralDietNutrientComponent(t, "NutritionOrder", "nutrient", element.getNutrient().get(i), i);
    for (int i = 0; i < element.getTexture().size(); i++) composeNutritionOrderNutritionOrderOralDietTextureComponent(t, "NutritionOrder", "texture", element.getTexture().get(i), i);
    for (int i = 0; i < element.getFluidConsistencyType().size(); i++) composeCodeableConcept(t, "NutritionOrder", "fluidConsistencyType", element.getFluidConsistencyType().get(i), i);
    if (element.hasInstructionElement())
        composeString(t, "NutritionOrder", "instruction", element.getInstructionElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Aggregations

Date (com.google.api.services.storagetransfer.v1.model.Date)7 Schedule (com.google.api.services.storagetransfer.v1.model.Schedule)7 Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)7 Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)7 Test (org.junit.Test)7 Storagetransfer (com.google.api.services.storagetransfer.v1.Storagetransfer)6 GcsData (com.google.api.services.storagetransfer.v1.model.GcsData)6 TimeOfDay (com.google.api.services.storagetransfer.v1.model.TimeOfDay)6 TransferJob (com.google.api.services.storagetransfer.v1.model.TransferJob)6 TransferSpec (com.google.api.services.storagetransfer.v1.model.TransferSpec)6 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)5 ObjectConditions (com.google.api.services.storagetransfer.v1.model.ObjectConditions)4 TransferOptions (com.google.api.services.storagetransfer.v1.model.TransferOptions)4 ScheduleDetail (uk.gov.hscic.model.appointment.ScheduleDetail)4 SlotDetail (uk.gov.hscic.model.appointment.SlotDetail)4 CodeableConcept (org.hl7.fhir.dstu3.model.CodeableConcept)3 IdType (org.hl7.fhir.dstu3.model.IdType)3 Bundle (org.hl7.fhir.r4.model.Bundle)3 IdDt (ca.uhn.fhir.model.primitive.IdDt)2 MethodOutcome (ca.uhn.fhir.rest.api.MethodOutcome)2