Search in sources :

Example 71 with DateTimeType

use of org.hl7.fhir.dstu2.model.DateTimeType in project MobileAccessGateway by i4mi.

the class Iti65RequestConverter method processDocumentManifest.

/**
 * ITI-65: process DocumentManifest resource from Bundle
 * @param manifest
 * @param submissionSet
 */
private void processDocumentManifest(DocumentManifest manifest, SubmissionSet submissionSet) {
    // masterIdentifier	SubmissionSet.uniqueId
    Identifier masterIdentifier = manifest.getMasterIdentifier();
    submissionSet.setUniqueId(noPrefix(masterIdentifier.getValue()));
    submissionSet.assignEntryUuid();
    manifest.setId(submissionSet.getEntryUuid());
    CodeableConcept type = manifest.getType();
    submissionSet.setContentTypeCode(transformCodeableConcept(type));
    DateTimeType created = manifest.getCreatedElement();
    submissionSet.setSubmissionTime(timestampFromDate(created));
    // subject	SubmissionSet.patientId
    Reference ref = manifest.getSubject();
    submissionSet.setPatientId(transformReferenceToIdentifiable(ref, manifest));
    // Author
    Extension authorRoleExt = manifest.getExtensionByUrl("http://fhir.ch/ig/ch-epr-mhealth/StructureDefinition/ch-ext-author-authorrole");
    if (manifest.hasAuthor() || (authorRoleExt != null)) {
        Identifiable identifiable = null;
        Reference author = manifest.getAuthorFirstRep();
        if (authorRoleExt != null) {
            Coding coding = authorRoleExt.castToCoding(authorRoleExt.getValue());
            if (coding != null) {
                identifiable = new Identifiable(coding.getCode(), new AssigningAuthority(noPrefix(coding.getSystem())));
            }
        }
        submissionSet.setAuthor(transformAuthor(author, manifest.getContained(), identifiable));
    }
    // recipient	SubmissionSet.intendedRecipient
    for (Reference recipientRef : manifest.getRecipient()) {
        Resource res = findResource(recipientRef, manifest.getContained());
        if (res instanceof Practitioner) {
            Recipient recipient = new Recipient();
            recipient.setPerson(transform((Practitioner) res));
            recipient.setTelecom(transform(((Practitioner) res).getTelecomFirstRep()));
            submissionSet.getIntendedRecipients().add(recipient);
        } else if (res instanceof Organization) {
            Recipient recipient = new Recipient();
            recipient.setOrganization(transform((Organization) res));
            recipient.setTelecom(transform(((Organization) res).getTelecomFirstRep()));
            submissionSet.getIntendedRecipients().add(recipient);
        } else if (res instanceof PractitionerRole) {
            Recipient recipient = new Recipient();
            PractitionerRole role = (PractitionerRole) res;
            recipient.setOrganization(transform((Organization) findResource(role.getOrganization(), manifest.getContained())));
            recipient.setPerson(transform((Practitioner) findResource(role.getPractitioner(), manifest.getContained())));
            recipient.setTelecom(transform(role.getTelecomFirstRep()));
            submissionSet.getIntendedRecipients().add(recipient);
        } else if (res instanceof Patient) {
            Recipient recipient = new Recipient();
            recipient.setPerson(transform((Patient) res));
            recipient.setTelecom(transform(((Patient) res).getTelecomFirstRep()));
        } else if (res instanceof RelatedPerson) {
            Recipient recipient = new Recipient();
            recipient.setPerson(transform((RelatedPerson) res));
            recipient.setTelecom(transform(((RelatedPerson) res).getTelecomFirstRep()));
        }
    }
    // source	SubmissionSet.sourceId
    String source = noPrefix(manifest.getSource());
    submissionSet.setSourceId(source);
    String description = manifest.getDescription();
    if (description != null)
        submissionSet.setTitle(localizedString(description));
}
Also used : Organization(org.hl7.fhir.r4.model.Organization) Reference(org.hl7.fhir.r4.model.Reference) DocumentReference(org.hl7.fhir.r4.model.DocumentReference) Resource(org.hl7.fhir.r4.model.Resource) ListResource(org.hl7.fhir.r4.model.ListResource) DomainResource(org.hl7.fhir.r4.model.DomainResource) Patient(org.hl7.fhir.r4.model.Patient) Recipient(org.openehealth.ipf.commons.ihe.xds.core.metadata.Recipient) AssigningAuthority(org.openehealth.ipf.commons.ihe.xds.core.metadata.AssigningAuthority) CXiAssigningAuthority(org.openehealth.ipf.commons.ihe.xds.core.metadata.CXiAssigningAuthority) PractitionerRole(org.hl7.fhir.r4.model.PractitionerRole) LocalizedString(org.openehealth.ipf.commons.ihe.xds.core.metadata.LocalizedString) RelatedPerson(org.hl7.fhir.r4.model.RelatedPerson) Identifiable(org.openehealth.ipf.commons.ihe.xds.core.metadata.Identifiable) Extension(org.hl7.fhir.r4.model.Extension) Practitioner(org.hl7.fhir.r4.model.Practitioner) DateTimeType(org.hl7.fhir.r4.model.DateTimeType) Identifier(org.hl7.fhir.r4.model.Identifier) Coding(org.hl7.fhir.r4.model.Coding) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept)

Example 72 with DateTimeType

use of org.hl7.fhir.dstu2.model.DateTimeType in project MobileAccessGateway by i4mi.

the class Iti65RequestConverter method processDocumentManifest.

/**
 * ITI-65: process ListResource resource from Bundle
 * @param manifest
 * @param submissionSet
 */
private void processDocumentManifest(ListResource manifest, SubmissionSet submissionSet) {
    for (Identifier id : manifest.getIdentifier()) {
        if (id.getUse() == null || id.getUse().equals(Identifier.IdentifierUse.OFFICIAL)) {
        } else if (id.getUse().equals(Identifier.IdentifierUse.USUAL)) {
            String uniqueId = noPrefix(id.getValue());
            submissionSet.setUniqueId(uniqueId);
        }
    }
    submissionSet.assignEntryUuid();
    manifest.setId(submissionSet.getEntryUuid());
    Extension designationType = manifest.getExtensionByUrl("http://profiles.ihe.net/ITI/MHD/StructureDefinition/ihe-designationType");
    if (designationType != null && designationType.getValue() instanceof CodeableConcept) {
        submissionSet.setContentTypeCode(transformCodeableConcept((CodeableConcept) designationType.getValue()));
    }
    DateTimeType created = manifest.getDateElement();
    submissionSet.setSubmissionTime(timestampFromDate(created));
    // subject	SubmissionSet.patientId
    Reference ref = manifest.getSubject();
    submissionSet.setPatientId(transformReferenceToIdentifiable(ref, manifest));
    // Author
    Extension authorRoleExt = manifest.getExtensionByUrl("http://fhir.ch/ig/ch-epr-mhealth/StructureDefinition/ch-ext-author-authorrole");
    if (manifest.hasSource() || (authorRoleExt != null)) {
        Identifiable identifiable = null;
        Reference author = manifest.getSource();
        if (authorRoleExt != null) {
            Coding coding = authorRoleExt.castToCoding(authorRoleExt.getValue());
            if (coding != null) {
                identifiable = new Identifiable(coding.getCode(), new AssigningAuthority(noPrefix(coding.getSystem())));
            }
        }
        submissionSet.setAuthor(transformAuthor(author, manifest.getContained(), identifiable));
    }
    for (Extension recipientExt : manifest.getExtensionsByUrl("http://profiles.ihe.net/ITI/MHD/StructureDefinition/ihe-intendedRecipient")) {
        Reference recipientRef = (Reference) recipientExt.getValue();
        Resource res = findResource(recipientRef, manifest.getContained());
        if (res instanceof Practitioner) {
            Recipient recipient = new Recipient();
            recipient.setPerson(transform((Practitioner) res));
            recipient.setTelecom(transform(((Practitioner) res).getTelecomFirstRep()));
            submissionSet.getIntendedRecipients().add(recipient);
        } else if (res instanceof Organization) {
            Recipient recipient = new Recipient();
            recipient.setOrganization(transform((Organization) res));
            recipient.setTelecom(transform(((Organization) res).getTelecomFirstRep()));
            submissionSet.getIntendedRecipients().add(recipient);
        } else if (res instanceof PractitionerRole) {
            Recipient recipient = new Recipient();
            PractitionerRole role = (PractitionerRole) res;
            recipient.setOrganization(transform((Organization) findResource(role.getOrganization(), manifest.getContained())));
            recipient.setPerson(transform((Practitioner) findResource(role.getPractitioner(), manifest.getContained())));
            recipient.setTelecom(transform(role.getTelecomFirstRep()));
            submissionSet.getIntendedRecipients().add(recipient);
        } else if (res instanceof Patient) {
            Recipient recipient = new Recipient();
            recipient.setPerson(transform((Patient) res));
            recipient.setTelecom(transform(((Patient) res).getTelecomFirstRep()));
        } else if (res instanceof RelatedPerson) {
            Recipient recipient = new Recipient();
            recipient.setPerson(transform((RelatedPerson) res));
            recipient.setTelecom(transform(((RelatedPerson) res).getTelecomFirstRep()));
        }
    }
    Extension source = manifest.getExtensionByUrl("http://profiles.ihe.net/ITI/MHD/StructureDefinition/ihe-sourceId");
    if (source != null && source.getValue() instanceof Identifier) {
        submissionSet.setSourceId(noPrefix(((Identifier) source.getValue()).getValue()));
    }
    String title = manifest.getTitle();
    if (title != null)
        submissionSet.setTitle(localizedString(title));
    Annotation note = manifest.getNoteFirstRep();
    if (note != null && note.hasText()) {
        submissionSet.setComments(localizedString(note.getText()));
    }
}
Also used : Organization(org.hl7.fhir.r4.model.Organization) Reference(org.hl7.fhir.r4.model.Reference) DocumentReference(org.hl7.fhir.r4.model.DocumentReference) Resource(org.hl7.fhir.r4.model.Resource) ListResource(org.hl7.fhir.r4.model.ListResource) DomainResource(org.hl7.fhir.r4.model.DomainResource) Patient(org.hl7.fhir.r4.model.Patient) Recipient(org.openehealth.ipf.commons.ihe.xds.core.metadata.Recipient) LocalizedString(org.openehealth.ipf.commons.ihe.xds.core.metadata.LocalizedString) AssigningAuthority(org.openehealth.ipf.commons.ihe.xds.core.metadata.AssigningAuthority) CXiAssigningAuthority(org.openehealth.ipf.commons.ihe.xds.core.metadata.CXiAssigningAuthority) PractitionerRole(org.hl7.fhir.r4.model.PractitionerRole) RelatedPerson(org.hl7.fhir.r4.model.RelatedPerson) Annotation(org.hl7.fhir.r4.model.Annotation) Identifiable(org.openehealth.ipf.commons.ihe.xds.core.metadata.Identifiable) Extension(org.hl7.fhir.r4.model.Extension) Practitioner(org.hl7.fhir.r4.model.Practitioner) DateTimeType(org.hl7.fhir.r4.model.DateTimeType) Identifier(org.hl7.fhir.r4.model.Identifier) Coding(org.hl7.fhir.r4.model.Coding) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept)

Example 73 with DateTimeType

use of org.hl7.fhir.dstu2.model.DateTimeType in project synthea by synthetichealth.

the class FhirR4 method medicationAdministration.

/**
 * Add a MedicationAdministration if needed for the given medication.
 *
 * @param rand              Source of randomness to use when generating ids etc
 * @param personEntry       The Entry for the Person
 * @param bundle            Bundle to add the MedicationAdministration to
 * @param encounterEntry    Current Encounter entry
 * @param medication        The Medication
 * @param medicationRequest The related medicationRequest
 * @return The added Entry
 */
private static BundleEntryComponent medicationAdministration(RandomNumberGenerator rand, BundleEntryComponent personEntry, Bundle bundle, BundleEntryComponent encounterEntry, Medication medication, MedicationRequest medicationRequest) {
    MedicationAdministration medicationResource = new MedicationAdministration();
    medicationResource.setSubject(new Reference(personEntry.getFullUrl()));
    medicationResource.setContext(new Reference(encounterEntry.getFullUrl()));
    Code code = medication.codes.get(0);
    String system = code.system.equals("SNOMED-CT") ? SNOMED_URI : RXNORM_URI;
    medicationResource.setMedication(mapCodeToCodeableConcept(code, system));
    medicationResource.setEffective(new DateTimeType(new Date(medication.start)));
    medicationResource.setStatus(MedicationAdministration.MedicationAdministrationStatus.COMPLETED);
    if (medication.prescriptionDetails != null) {
        JsonObject rxInfo = medication.prescriptionDetails;
        MedicationAdministrationDosageComponent dosage = new MedicationAdministrationDosageComponent();
        // as_needed is false
        if ((rxInfo.has("dosage")) && (!rxInfo.has("as_needed"))) {
            Quantity dose = new SimpleQuantity().setValue(rxInfo.get("dosage").getAsJsonObject().get("amount").getAsDouble());
            dosage.setDose((SimpleQuantity) dose);
            if (rxInfo.has("instructions")) {
                for (JsonElement instructionElement : rxInfo.get("instructions").getAsJsonArray()) {
                    JsonObject instruction = instructionElement.getAsJsonObject();
                    dosage.setText(instruction.get("display").getAsString());
                }
            }
        }
        if (rxInfo.has("refills")) {
            SimpleQuantity rate = new SimpleQuantity();
            rate.setValue(rxInfo.get("refills").getAsLong());
            dosage.setRate(rate);
        }
        medicationResource.setDosage(dosage);
    }
    if (!medication.reasons.isEmpty()) {
        // Only one element in list
        Code reason = medication.reasons.get(0);
        for (BundleEntryComponent entry : bundle.getEntry()) {
            if (entry.getResource().fhirType().equals("Condition")) {
                Condition condition = (Condition) entry.getResource();
                // Only one element in list
                Coding coding = condition.getCode().getCoding().get(0);
                if (reason.code.equals(coding.getCode())) {
                    medicationResource.addReasonReference().setReference(entry.getFullUrl());
                }
            }
        }
    }
    BundleEntryComponent medicationAdminEntry = newEntry(rand, bundle, medicationResource);
    return medicationAdminEntry;
}
Also used : Condition(org.hl7.fhir.r4.model.Condition) Reference(org.hl7.fhir.r4.model.Reference) DocumentReference(org.hl7.fhir.r4.model.DocumentReference) SimpleQuantity(org.hl7.fhir.r4.model.SimpleQuantity) JsonObject(com.google.gson.JsonObject) SimpleQuantity(org.hl7.fhir.r4.model.SimpleQuantity) Quantity(org.hl7.fhir.r4.model.Quantity) Code(org.mitre.synthea.world.concepts.HealthRecord.Code) Date(java.util.Date) DateTimeType(org.hl7.fhir.r4.model.DateTimeType) BundleEntryComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryComponent) MedicationAdministrationDosageComponent(org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationDosageComponent) Coding(org.hl7.fhir.r4.model.Coding) JsonElement(com.google.gson.JsonElement) MedicationAdministration(org.hl7.fhir.r4.model.MedicationAdministration)

Example 74 with DateTimeType

use of org.hl7.fhir.dstu2.model.DateTimeType in project gpconnect-demonstrator by nhsconnect.

the class MedicationStatementResourceProvider method getMedicationStatementResource.

public MedicationStatement getMedicationStatementResource(MedicationStatementDetail statementDetail) {
    MedicationStatement medicationStatement = new MedicationStatement();
    medicationStatement.setId(statementDetail.getId().toString());
    List<Identifier> identifiers = new ArrayList<>();
    Identifier identifier = new Identifier().setSystem("https://fhir.nhs.uk/Id/cross-care-setting-identifier").setValue(statementDetail.getGuid());
    identifiers.add(identifier);
    medicationStatement.setIdentifier(identifiers);
    medicationStatement.setMeta(new Meta().addProfile(SystemURL.SD_GPC_MEDICATION_STATEMENT));
    medicationStatement.addExtension(new Extension(SystemURL.SD_CC_EXT_MEDICATION_STATEMENT_LAST_ISSUE, new DateTimeType(statementDetail.getLastIssueDate(), TemporalPrecisionEnum.DAY)));
    if (statementDetail.getMedicationRequestPlanId() != null) {
        medicationStatement.addBasedOn(new Reference(new IdType("MedicationRequest", statementDetail.getMedicationRequestPlanId())));
    }
    try {
        medicationStatement.setStatus(MedicationStatementStatus.fromCode(statementDetail.getStatusCode()));
    } catch (FHIRException e) {
        throw new UnprocessableEntityException(e.getMessage());
    }
    if (statementDetail.getMedicationId() != null) {
        medicationStatement.setMedication(new Reference(new IdType("Medication", statementDetail.getMedicationId())));
    }
    medicationStatement.setEffective(new Period().setStart(statementDetail.getStartDate()).setEnd(statementDetail.getEndDate()));
    medicationStatement.setDateAsserted(statementDetail.getDateAsserted());
    if (statementDetail.getPatientId() != null)
        medicationStatement.setSubject(new Reference(new IdType("Patient", statementDetail.getPatientId())));
    try {
        medicationStatement.setTaken(statementDetail.getTakenCode() != null ? MedicationStatementTaken.fromCode(statementDetail.getTakenCode()) : MedicationStatementTaken.UNK);
    } catch (FHIRException e) {
        throw new UnprocessableEntityException(e.getMessage());
    }
    setReasonCodes(medicationStatement, statementDetail);
    setNotes(medicationStatement, statementDetail);
    String dosageText = statementDetail.getDosageText();
    medicationStatement.addDosage(new Dosage().setText(dosageText == null || dosageText.trim().isEmpty() ? NO_INFORMATION_AVAILABLE : dosageText).setPatientInstruction(statementDetail.getDosagePatientInstruction()));
    String prescribingAgency = statementDetail.getPrescribingAgency();
    if (prescribingAgency != null && !prescribingAgency.trim().isEmpty()) {
        String prescribingAgencyDisplay = "";
        if (prescribingAgency.equalsIgnoreCase("prescribed-at-gp-practice")) {
            prescribingAgencyDisplay = "Prescribed at GP practice";
        } else if (prescribingAgency.equalsIgnoreCase("prescribed-by-another-organisation")) {
            prescribingAgencyDisplay = "Prescribed by another organisation";
        }
        Coding coding = new Coding(SystemURL.CS_CC_PRESCRIBING_AGENCY_STU3, prescribingAgency, prescribingAgencyDisplay);
        CodeableConcept codeableConcept = new CodeableConcept().addCoding(coding);
        medicationStatement.addExtension(new Extension(SystemURL.SD_EXTENSION_CC_PRESCRIBING_AGENCY, codeableConcept));
    }
    // #281 1.2.5 add dosageLastChanged
    Date dosageLastChanged = statementDetail.getDosageLastChanged();
    if (dosageLastChanged != null) {
        medicationStatement.addExtension(new Extension(SystemURL.SD_EXTENSION_CC_DOSAGE_LAST_CHANGED, new DateTimeType(dosageLastChanged)));
    }
    return medicationStatement;
}
Also used : UnprocessableEntityException(ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException) ArrayList(java.util.ArrayList) FHIRException(org.hl7.fhir.exceptions.FHIRException) Date(java.util.Date)

Example 75 with DateTimeType

use of org.hl7.fhir.dstu2.model.DateTimeType in project gpconnect-demonstrator by nhsconnect.

the class PatientResourceProvider method registerPatientResourceConverterToPatientDetail.

private PatientDetails registerPatientResourceConverterToPatientDetail(Patient patientResource) {
    PatientDetails patientDetails = new PatientDetails();
    HumanName name = patientResource.getNameFirstRep();
    String givenNames = name.getGiven().stream().map(n -> n.getValue()).collect(Collectors.joining(","));
    patientDetails.setForename(givenNames);
    patientDetails.setSurname(name.getFamily());
    patientDetails.setDateOfBirth(patientResource.getBirthDate());
    if (patientResource.getGender() != null) {
        patientDetails.setGender(patientResource.getGender().toString());
    }
    patientDetails.setNhsNumber(patientResource.getIdentifierFirstRep().getValue());
    DateTimeType deceased = (DateTimeType) patientResource.getDeceased();
    if (deceased != null) {
        try {
            patientDetails.setDeceased((deceased.getValue()));
        } catch (ClassCastException cce) {
            throwUnprocessableEntity422_InvalidResourceException("The multiple deceased property is expected to be a datetime");
        }
    }
    // activate patient as temporary
    patientDetails.setRegistrationStartDateTime(new Date());
    // patientDetails.setRegistrationEndDateTime(getRegistrationEndDate(patientResource));
    patientDetails.setRegistrationStatus(ACTIVE_REGISTRATION_STATUS);
    patientDetails.setRegistrationType(TEMPORARY_RESIDENT_REGISTRATION_TYPE);
    updateAddressAndTelecom(patientResource, patientDetails);
    // set some standard values for defaults, ensure managing org is always returned
    // added at 1.2.2 7 is A20047 the default GP Practice
    patientDetails.setManagingOrganization("7");
    return patientDetails;
}
Also used : ParametersParameterComponent(org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent) AppointmentResourceProvider(uk.gov.hscic.appointments.AppointmentResourceProvider) Autowired(org.springframework.beans.factory.annotation.Autowired) IdentifierUse(org.hl7.fhir.dstu3.model.Identifier.IdentifierUse) NhsCodeValidator(uk.gov.hscic.util.NhsCodeValidator) OperationOutcomeIssueComponent(org.hl7.fhir.dstu3.model.OperationOutcome.OperationOutcomeIssueComponent) FhirRequestGenericIntercepter.throwInvalidRequest400_BadRequestException(uk.gov.hscic.common.filters.FhirRequestGenericIntercepter.throwInvalidRequest400_BadRequestException) ForbiddenOperationException(ca.uhn.fhir.rest.server.exceptions.ForbiddenOperationException) IResourceProvider(ca.uhn.fhir.rest.server.IResourceProvider) VS_GPC_ERROR_WARNING_CODE(uk.gov.hscic.SystemURL.VS_GPC_ERROR_WARNING_CODE) ParseException(java.text.ParseException) OrganizationSearch(uk.gov.hscic.organization.OrganizationSearch) IdDt(ca.uhn.fhir.model.primitive.IdDt) InvalidRequestException(ca.uhn.fhir.rest.server.exceptions.InvalidRequestException) OrganizationDetails(uk.gov.hscic.model.organization.OrganizationDetails) Count(ca.uhn.fhir.rest.annotation.Count) Collectors(java.util.stream.Collectors) UnclassifiedServerFailureException(ca.uhn.fhir.rest.server.exceptions.UnclassifiedServerFailureException) IssueType(org.hl7.fhir.dstu3.model.OperationOutcome.IssueType) AdministrativeGender(org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender) SortSpec(ca.uhn.fhir.rest.api.SortSpec) IdentifierValidator(uk.gov.hscic.common.validators.IdentifierValidator) PostConstruct(javax.annotation.PostConstruct) ContactPointSystem(org.hl7.fhir.dstu3.model.ContactPoint.ContactPointSystem) SystemCode(uk.gov.hscic.SystemCode) PopulateMedicationBundle(uk.gov.hscic.medications.PopulateMedicationBundle) Pattern(java.util.regex.Pattern) NameUse(org.hl7.fhir.dstu3.model.HumanName.NameUse) PatientSearch(uk.gov.hscic.patient.details.PatientSearch) AddressType(org.hl7.fhir.dstu3.model.Address.AddressType) java.util(java.util) FhirRequestGenericIntercepter.throwUnprocessableEntity422_InvalidResourceException(uk.gov.hscic.common.filters.FhirRequestGenericIntercepter.throwUnprocessableEntity422_InvalidResourceException) PatientStore(uk.gov.hscic.patient.details.PatientStore) SimpleDateFormat(java.text.SimpleDateFormat) PractitionerRoleResourceProvider(uk.gov.hscic.practitioner.PractitionerRoleResourceProvider) SD_CC_EXT_NHS_COMMUNICATION(uk.gov.hscic.SystemURL.SD_CC_EXT_NHS_COMMUNICATION) PractitionerResourceProvider(uk.gov.hscic.practitioner.PractitionerResourceProvider) Value(org.springframework.beans.factory.annotation.Value) UnprocessableEntityException(ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException) TelecomDetails(uk.gov.hscic.model.telecom.TelecomDetails) AddressUse(org.hl7.fhir.dstu3.model.Address.AddressUse) WORK(org.hl7.fhir.dstu3.model.Address.AddressUse.WORK) org.hl7.fhir.dstu3.model(org.hl7.fhir.dstu3.model) ResourceNotFoundException(ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException) Integer.min(java.lang.Integer.min) ca.uhn.fhir.rest.annotation(ca.uhn.fhir.rest.annotation) PatientDetails(uk.gov.hscic.model.patient.PatientDetails) BundleType(org.hl7.fhir.dstu3.model.Bundle.BundleType) SystemConstants(uk.gov.hscic.SystemConstants) SystemURL(uk.gov.hscic.SystemURL) OLD(org.hl7.fhir.dstu3.model.Address.AddressUse.OLD) TokenParam(ca.uhn.fhir.rest.param.TokenParam) ContactComponent(org.hl7.fhir.dstu3.model.Patient.ContactComponent) OperationOutcomeFactory(uk.gov.hscic.OperationOutcomeFactory) Component(org.springframework.stereotype.Component) StaticElementsHelper(uk.gov.hscic.common.helpers.StaticElementsHelper) DateAndListParam(ca.uhn.fhir.rest.param.DateAndListParam) ContactPointUse(org.hl7.fhir.dstu3.model.ContactPoint.ContactPointUse) OrganizationResourceProvider(uk.gov.hscic.organization.OrganizationResourceProvider) FHIRException(org.hl7.fhir.exceptions.FHIRException) PatientDetails(uk.gov.hscic.model.patient.PatientDetails)

Aggregations

DateTimeType (org.hl7.fhir.r4.model.DateTimeType)65 Date (java.util.Date)28 Test (org.junit.Test)25 Coding (org.hl7.fhir.r4.model.Coding)23 DateTimeType (org.hl7.fhir.dstu3.model.DateTimeType)18 Period (org.hl7.fhir.r4.model.Period)18 ArrayList (java.util.ArrayList)17 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)17 Observation (org.hl7.fhir.r4.model.Observation)16 Test (org.junit.jupiter.api.Test)16 Patient (org.hl7.fhir.r4.model.Patient)14 DateTimeType (org.hl7.fhir.r4b.model.DateTimeType)14 HashMap (java.util.HashMap)13 DateTimeType (org.hl7.fhir.r5.model.DateTimeType)13 NotImplementedException (org.apache.commons.lang3.NotImplementedException)12 Reference (org.hl7.fhir.r4.model.Reference)12 List (java.util.List)11 Reference (org.hl7.fhir.dstu3.model.Reference)11 FHIRException (org.hl7.fhir.exceptions.FHIRException)11 Resource (org.hl7.fhir.r4.model.Resource)11