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));
}
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());
}
}
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());
}
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);
}
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);
}
Aggregations