Class MedicationRequest.Builder

    • Method Detail

      • id

        public MedicationRequest.Builder id​(java.lang.String id)
        The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
        Overrides:
        id in class DomainResource.Builder
        Parameters:
        id - Logical id of this artifact
        Returns:
        A reference to this Builder instance
      • meta

        public MedicationRequest.Builder meta​(Meta meta)
        The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
        Overrides:
        meta in class DomainResource.Builder
        Parameters:
        meta - Metadata about the resource
        Returns:
        A reference to this Builder instance
      • implicitRules

        public MedicationRequest.Builder implicitRules​(Uri implicitRules)
        A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.
        Overrides:
        implicitRules in class DomainResource.Builder
        Parameters:
        implicitRules - A set of rules under which this content was created
        Returns:
        A reference to this Builder instance
      • text

        public MedicationRequest.Builder text​(Narrative text)
        A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.
        Overrides:
        text in class DomainResource.Builder
        Parameters:
        text - Text summary of the resource, for human interpretation
        Returns:
        A reference to this Builder instance
      • contained

        public MedicationRequest.Builder contained​(Resource... contained)
        These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.

        Adds new element(s) to the existing list. If any of the elements are null, calling build() will fail.

        Overrides:
        contained in class DomainResource.Builder
        Parameters:
        contained - Contained, inline Resources
        Returns:
        A reference to this Builder instance
      • contained

        public MedicationRequest.Builder contained​(java.util.Collection<Resource> contained)
        These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.

        Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling build() will fail.

        Overrides:
        contained in class DomainResource.Builder
        Parameters:
        contained - Contained, inline Resources
        Returns:
        A reference to this Builder instance
        Throws:
        java.lang.NullPointerException - If the passed collection is null
      • extension

        public MedicationRequest.Builder extension​(Extension... extension)
        May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

        Adds new element(s) to the existing list. If any of the elements are null, calling build() will fail.

        Overrides:
        extension in class DomainResource.Builder
        Parameters:
        extension - Additional content defined by implementations
        Returns:
        A reference to this Builder instance
      • extension

        public MedicationRequest.Builder extension​(java.util.Collection<Extension> extension)
        May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

        Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling build() will fail.

        Overrides:
        extension in class DomainResource.Builder
        Parameters:
        extension - Additional content defined by implementations
        Returns:
        A reference to this Builder instance
        Throws:
        java.lang.NullPointerException - If the passed collection is null
      • modifierExtension

        public MedicationRequest.Builder modifierExtension​(Extension... modifierExtension)
        May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

        Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).

        Adds new element(s) to the existing list. If any of the elements are null, calling build() will fail.

        Overrides:
        modifierExtension in class DomainResource.Builder
        Parameters:
        modifierExtension - Extensions that cannot be ignored
        Returns:
        A reference to this Builder instance
      • modifierExtension

        public MedicationRequest.Builder modifierExtension​(java.util.Collection<Extension> modifierExtension)
        May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

        Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).

        Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling build() will fail.

        Overrides:
        modifierExtension in class DomainResource.Builder
        Parameters:
        modifierExtension - Extensions that cannot be ignored
        Returns:
        A reference to this Builder instance
        Throws:
        java.lang.NullPointerException - If the passed collection is null
      • identifier

        public MedicationRequest.Builder identifier​(Identifier... identifier)
        Identifiers associated with this medication request that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.

        Adds new element(s) to the existing list. If any of the elements are null, calling build() will fail.

        Parameters:
        identifier - External ids for this request
        Returns:
        A reference to this Builder instance
      • identifier

        public MedicationRequest.Builder identifier​(java.util.Collection<Identifier> identifier)
        Identifiers associated with this medication request that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.

        Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling build() will fail.

        Parameters:
        identifier - External ids for this request
        Returns:
        A reference to this Builder instance
        Throws:
        java.lang.NullPointerException - If the passed collection is null
      • status

        public MedicationRequest.Builder status​(MedicationRequestStatus status)
        A code specifying the current state of the order. Generally, this will be active or completed state.

        This element is required.

        Parameters:
        status - active | on-hold | cancelled | completed | entered-in-error | stopped | draft | unknown
        Returns:
        A reference to this Builder instance
      • statusReason

        public MedicationRequest.Builder statusReason​(CodeableConcept statusReason)
        Captures the reason for the current state of the MedicationRequest.
        Parameters:
        statusReason - Reason for current status
        Returns:
        A reference to this Builder instance
      • intent

        public MedicationRequest.Builder intent​(MedicationRequestIntent intent)
        Whether the request is a proposal, plan, or an original order.

        This element is required.

        Parameters:
        intent - proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option
        Returns:
        A reference to this Builder instance
      • category

        public MedicationRequest.Builder category​(CodeableConcept... category)
        Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient)).

        Adds new element(s) to the existing list. If any of the elements are null, calling build() will fail.

        Parameters:
        category - Type of medication usage
        Returns:
        A reference to this Builder instance
      • category

        public MedicationRequest.Builder category​(java.util.Collection<CodeableConcept> category)
        Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient)).

        Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling build() will fail.

        Parameters:
        category - Type of medication usage
        Returns:
        A reference to this Builder instance
        Throws:
        java.lang.NullPointerException - If the passed collection is null
      • priority

        public MedicationRequest.Builder priority​(MedicationRequestPriority priority)
        Indicates how quickly the Medication Request should be addressed with respect to other requests.
        Parameters:
        priority - routine | urgent | asap | stat
        Returns:
        A reference to this Builder instance
      • doNotPerform

        public MedicationRequest.Builder doNotPerform​(Boolean doNotPerform)
        If true indicates that the provider is asking for the medication request not to occur.
        Parameters:
        doNotPerform - True if request is prohibiting action
        Returns:
        A reference to this Builder instance
      • reported

        public MedicationRequest.Builder reported​(java.lang.Boolean reported)
        Convenience method for setting reported with choice type Boolean.
        Parameters:
        reported - Reported rather than primary record
        Returns:
        A reference to this Builder instance
        See Also:
        reported(Element)
      • medication

        public MedicationRequest.Builder medication​(Element medication)
        Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.

        This element is required.

        This is a choice element with the following allowed types:

        When of type Reference, the allowed resource types for this reference are:
        Parameters:
        medication - Medication to be taken
        Returns:
        A reference to this Builder instance
      • subject

        public MedicationRequest.Builder subject​(Reference subject)
        A link to a resource representing the person or set of individuals to whom the medication will be given.

        This element is required.

        Allowed resource types for this reference:

        Parameters:
        subject - Who or group medication request is for
        Returns:
        A reference to this Builder instance
      • encounter

        public MedicationRequest.Builder encounter​(Reference encounter)
        The Encounter during which this [x] was created or to which the creation of this record is tightly associated.

        Allowed resource types for this reference:

        Parameters:
        encounter - Encounter created as part of encounter/admission/stay
        Returns:
        A reference to this Builder instance
      • supportingInformation

        public MedicationRequest.Builder supportingInformation​(Reference... supportingInformation)
        Include additional information (for example, patient height and weight) that supports the ordering of the medication.

        Adds new element(s) to the existing list. If any of the elements are null, calling build() will fail.

        Parameters:
        supportingInformation - Information to support ordering of the medication
        Returns:
        A reference to this Builder instance
      • supportingInformation

        public MedicationRequest.Builder supportingInformation​(java.util.Collection<Reference> supportingInformation)
        Include additional information (for example, patient height and weight) that supports the ordering of the medication.

        Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling build() will fail.

        Parameters:
        supportingInformation - Information to support ordering of the medication
        Returns:
        A reference to this Builder instance
        Throws:
        java.lang.NullPointerException - If the passed collection is null
      • authoredOn

        public MedicationRequest.Builder authoredOn​(DateTime authoredOn)
        The date (and perhaps time) when the prescription was initially written or authored on.
        Parameters:
        authoredOn - When request was initially authored
        Returns:
        A reference to this Builder instance
      • performerType

        public MedicationRequest.Builder performerType​(CodeableConcept performerType)
        Indicates the type of performer of the administration of the medication.
        Parameters:
        performerType - Desired kind of performer of the medication administration
        Returns:
        A reference to this Builder instance
      • recorder

        public MedicationRequest.Builder recorder​(Reference recorder)
        The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.

        Allowed resource types for this reference:

        Parameters:
        recorder - Person who entered the request
        Returns:
        A reference to this Builder instance
      • reasonCode

        public MedicationRequest.Builder reasonCode​(CodeableConcept... reasonCode)
        The reason or the indication for ordering or not ordering the medication.

        Adds new element(s) to the existing list. If any of the elements are null, calling build() will fail.

        Parameters:
        reasonCode - Reason or indication for ordering or not ordering the medication
        Returns:
        A reference to this Builder instance
      • reasonCode

        public MedicationRequest.Builder reasonCode​(java.util.Collection<CodeableConcept> reasonCode)
        The reason or the indication for ordering or not ordering the medication.

        Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling build() will fail.

        Parameters:
        reasonCode - Reason or indication for ordering or not ordering the medication
        Returns:
        A reference to this Builder instance
        Throws:
        java.lang.NullPointerException - If the passed collection is null
      • reasonReference

        public MedicationRequest.Builder reasonReference​(Reference... reasonReference)
        Condition or observation that supports why the medication was ordered.

        Adds new element(s) to the existing list. If any of the elements are null, calling build() will fail.

        Allowed resource types for the references:

        Parameters:
        reasonReference - Condition or observation that supports why the prescription is being written
        Returns:
        A reference to this Builder instance
      • reasonReference

        public MedicationRequest.Builder reasonReference​(java.util.Collection<Reference> reasonReference)
        Condition or observation that supports why the medication was ordered.

        Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling build() will fail.

        Allowed resource types for the references:

        Parameters:
        reasonReference - Condition or observation that supports why the prescription is being written
        Returns:
        A reference to this Builder instance
        Throws:
        java.lang.NullPointerException - If the passed collection is null
      • instantiatesCanonical

        public MedicationRequest.Builder instantiatesCanonical​(Canonical... instantiatesCanonical)
        The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.

        Adds new element(s) to the existing list. If any of the elements are null, calling build() will fail.

        Parameters:
        instantiatesCanonical - Instantiates FHIR protocol or definition
        Returns:
        A reference to this Builder instance
      • instantiatesCanonical

        public MedicationRequest.Builder instantiatesCanonical​(java.util.Collection<Canonical> instantiatesCanonical)
        The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.

        Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling build() will fail.

        Parameters:
        instantiatesCanonical - Instantiates FHIR protocol or definition
        Returns:
        A reference to this Builder instance
        Throws:
        java.lang.NullPointerException - If the passed collection is null
      • instantiatesUri

        public MedicationRequest.Builder instantiatesUri​(Uri... instantiatesUri)
        The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.

        Adds new element(s) to the existing list. If any of the elements are null, calling build() will fail.

        Parameters:
        instantiatesUri - Instantiates external protocol or definition
        Returns:
        A reference to this Builder instance
      • instantiatesUri

        public MedicationRequest.Builder instantiatesUri​(java.util.Collection<Uri> instantiatesUri)
        The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.

        Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling build() will fail.

        Parameters:
        instantiatesUri - Instantiates external protocol or definition
        Returns:
        A reference to this Builder instance
        Throws:
        java.lang.NullPointerException - If the passed collection is null
      • basedOn

        public MedicationRequest.Builder basedOn​(java.util.Collection<Reference> basedOn)
        A plan or request that is fulfilled in whole or in part by this medication request.

        Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling build() will fail.

        Allowed resource types for the references:

        Parameters:
        basedOn - What request fulfills
        Returns:
        A reference to this Builder instance
        Throws:
        java.lang.NullPointerException - If the passed collection is null
      • groupIdentifier

        public MedicationRequest.Builder groupIdentifier​(Identifier groupIdentifier)
        A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.
        Parameters:
        groupIdentifier - Composite request this is part of
        Returns:
        A reference to this Builder instance
      • courseOfTherapyType

        public MedicationRequest.Builder courseOfTherapyType​(CodeableConcept courseOfTherapyType)
        The description of the overall patte3rn of the administration of the medication to the patient.
        Parameters:
        courseOfTherapyType - Overall pattern of medication administration
        Returns:
        A reference to this Builder instance
      • insurance

        public MedicationRequest.Builder insurance​(Reference... insurance)
        Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.

        Adds new element(s) to the existing list. If any of the elements are null, calling build() will fail.

        Allowed resource types for the references:

        Parameters:
        insurance - Associated insurance coverage
        Returns:
        A reference to this Builder instance
      • insurance

        public MedicationRequest.Builder insurance​(java.util.Collection<Reference> insurance)
        Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.

        Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling build() will fail.

        Allowed resource types for the references:

        Parameters:
        insurance - Associated insurance coverage
        Returns:
        A reference to this Builder instance
        Throws:
        java.lang.NullPointerException - If the passed collection is null
      • note

        public MedicationRequest.Builder note​(Annotation... note)
        Extra information about the prescription that could not be conveyed by the other attributes.

        Adds new element(s) to the existing list. If any of the elements are null, calling build() will fail.

        Parameters:
        note - Information about the prescription
        Returns:
        A reference to this Builder instance
      • note

        public MedicationRequest.Builder note​(java.util.Collection<Annotation> note)
        Extra information about the prescription that could not be conveyed by the other attributes.

        Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling build() will fail.

        Parameters:
        note - Information about the prescription
        Returns:
        A reference to this Builder instance
        Throws:
        java.lang.NullPointerException - If the passed collection is null
      • dosageInstruction

        public MedicationRequest.Builder dosageInstruction​(Dosage... dosageInstruction)
        Indicates how the medication is to be used by the patient.

        Adds new element(s) to the existing list. If any of the elements are null, calling build() will fail.

        Parameters:
        dosageInstruction - How the medication should be taken
        Returns:
        A reference to this Builder instance
      • dosageInstruction

        public MedicationRequest.Builder dosageInstruction​(java.util.Collection<Dosage> dosageInstruction)
        Indicates how the medication is to be used by the patient.

        Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling build() will fail.

        Parameters:
        dosageInstruction - How the medication should be taken
        Returns:
        A reference to this Builder instance
        Throws:
        java.lang.NullPointerException - If the passed collection is null
      • dispenseRequest

        public MedicationRequest.Builder dispenseRequest​(MedicationRequest.DispenseRequest dispenseRequest)
        Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order). Note that this information is not always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.
        Parameters:
        dispenseRequest - Medication supply authorization
        Returns:
        A reference to this Builder instance
      • substitution

        public MedicationRequest.Builder substitution​(MedicationRequest.Substitution substitution)
        Indicates whether or not substitution can or should be part of the dispense. In some cases, substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done.
        Parameters:
        substitution - Any restrictions on medication substitution
        Returns:
        A reference to this Builder instance
      • priorPrescription

        public MedicationRequest.Builder priorPrescription​(Reference priorPrescription)
        A link to a resource representing an earlier order related order or prescription.

        Allowed resource types for this reference:

        Parameters:
        priorPrescription - An order/prescription that is being replaced
        Returns:
        A reference to this Builder instance
      • detectedIssue

        public MedicationRequest.Builder detectedIssue​(Reference... detectedIssue)
        Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc.

        Adds new element(s) to the existing list. If any of the elements are null, calling build() will fail.

        Allowed resource types for the references:

        Parameters:
        detectedIssue - Clinical Issue with action
        Returns:
        A reference to this Builder instance
      • detectedIssue

        public MedicationRequest.Builder detectedIssue​(java.util.Collection<Reference> detectedIssue)
        Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc.

        Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling build() will fail.

        Allowed resource types for the references:

        Parameters:
        detectedIssue - Clinical Issue with action
        Returns:
        A reference to this Builder instance
        Throws:
        java.lang.NullPointerException - If the passed collection is null
      • eventHistory

        public MedicationRequest.Builder eventHistory​(Reference... eventHistory)
        Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.

        Adds new element(s) to the existing list. If any of the elements are null, calling build() will fail.

        Allowed resource types for the references:

        Parameters:
        eventHistory - A list of events of interest in the lifecycle
        Returns:
        A reference to this Builder instance
      • eventHistory

        public MedicationRequest.Builder eventHistory​(java.util.Collection<Reference> eventHistory)
        Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.

        Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling build() will fail.

        Allowed resource types for the references:

        Parameters:
        eventHistory - A list of events of interest in the lifecycle
        Returns:
        A reference to this Builder instance
        Throws:
        java.lang.NullPointerException - If the passed collection is null