AU Core Implementation Guide
0.2.0-preview - QA Preview Australia flag

This page is part of the Australian Core IG (v0.2.0-preview: AU Core) based on FHIR R4. For a full list of available versions, see the Directory of published versions

Resource Profile: AU Core CarePlan

Official URL: http://hl7.org.au/fhir/core/StructureDefinition/au-core-careplan Version: 0.2.0-preview
Standards status: Draft Maturity Level: 0 Computable Name: AUCoreCarePlan

Copyright/Legal: Used by permission of HL7 International, all rights reserved Creative Commons License. HL7 Australia© 2022+; Licensed Under Creative Commons No Rights Reserved.

This profile sets minimum expectations for a CarePlan resource to record, search, and fetch information about a care team. It is based on the core CarePlan resource and identifies the additional mandatory core elements, extensions, vocabularies and value sets that SHALL be present in the CarePlan when conforming to this profile. It provides the floor for standards development for specific uses cases in an Australian context.

Usage scenarios

The following are supported usage scenarios for this profile:

  • Query for a care plan for a patient
  • Record or update a patient’s care plans

Comparison with other national and international specifications

A resource conforming to this profile:

  • MAY be conformant to US Core CarePlan if CarePlan.text is included and CarePlan.category supplies the US Core specific terminology

No equivalent International Patient Access or International Patient Summary profile, noting that International Patient Summary supports the core FHIR CarePlan resource unprofiled.

Conformance in reverse is not guaranteed, i.e. a resource conforming to US Core MAY NOT conform to AU Core.

Profile specific implementation guidance

  • a care plan can be
    • primarily narrative care plan supported using CarePlan.text
    • structured using CarePlan.goal and CarePlan.activity
  • to tie a care plan to a specific condition, CarePlan.addresses can be used to reference a Condition resource.
  • a Provenance resource can be used for detailed review information such as date of last review and who reviewed the care plan.

Specific feedback is sought on appropriate category values for care plans.

Usage:

Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work.

This structure is derived from CarePlan

NameFlagsCard.TypeDescription & Constraintsdoco
.. CarePlan 0..*CarePlanHealthcare plan for patient or group
... identifier S0..*IdentifierExternal Ids for this plan
... status S1..1codedraft | active | on-hold | revoked | completed | entered-in-error | unknown
... intent S1..1codeproposal | plan | order | option
... subject S1..1Reference(AU Core Patient)Who the care plan is for

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraintsdoco
.. CarePlan 0..*CarePlanHealthcare plan for patient or group
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
... identifier SΣ0..*IdentifierExternal Ids for this plan
... intent ?!SΣ1..1codeproposal | plan | order | option
Binding: CarePlanIntent (required): Codes indicating the degree of authority/intentionality associated with a care plan.

... category SΣ0..*CodeableConceptType of plan
Binding: CarePlanCategory (example): Identifies what "kind" of plan this is to support differentiation between multiple co-existing plans; e.g. "Home health", "psychiatric", "asthma", "disease management", etc.


... subject SΣ1..1Reference(AU Core Patient)Who the care plan is for

doco Documentation for this format

Terminology Bindings

PathConformanceValueSet
CarePlan.statusrequiredRequestStatus
CarePlan.intentrequiredCarePlanIntent
CarePlan.categoryexampleCarePlanCategory
NameFlagsCard.TypeDescription & Constraintsdoco
.. CarePlan 0..*CarePlanHealthcare plan for patient or group
... id Σ0..1idLogical id of this artifact
... meta Σ0..1MetaMetadata about the resource
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... language 0..1codeLanguage of the resource content
Binding: CommonLanguages (preferred): A human language.

Additional BindingsPurpose
AllLanguagesMax Binding
... text 0..1NarrativeText summary of the resource, for human interpretation
... contained 0..*ResourceContained, inline Resources
... extension 0..*ExtensionAdditional content defined by implementations
... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
... identifier SΣ0..*IdentifierExternal Ids for this plan
... instantiatesCanonical Σ0..*canonical(PlanDefinition | Questionnaire | Measure | ActivityDefinition | OperationDefinition)Instantiates FHIR protocol or definition
... instantiatesUri Σ0..*uriInstantiates external protocol or definition
... basedOn Σ0..*Reference(CarePlan)Fulfills CarePlan
... replaces Σ0..*Reference(CarePlan)CarePlan replaced by this CarePlan
... partOf Σ0..*Reference(CarePlan)Part of referenced CarePlan
... status ?!SΣ1..1codedraft | active | on-hold | revoked | completed | entered-in-error | unknown
Binding: RequestStatus (required): Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.

... intent ?!SΣ1..1codeproposal | plan | order | option
Binding: CarePlanIntent (required): Codes indicating the degree of authority/intentionality associated with a care plan.

... category SΣ0..*CodeableConceptType of plan
Binding: CarePlanCategory (example): Identifies what "kind" of plan this is to support differentiation between multiple co-existing plans; e.g. "Home health", "psychiatric", "asthma", "disease management", etc.


... title Σ0..1stringHuman-friendly name for the care plan
... description Σ0..1stringSummary of nature of plan
... subject SΣ1..1Reference(AU Core Patient)Who the care plan is for
... encounter Σ0..1Reference(Encounter)Encounter created as part of
... period Σ0..1PeriodTime period plan covers
... created Σ0..1dateTimeDate record was first recorded
... author Σ0..1Reference(Patient | Practitioner | PractitionerRole | Device | RelatedPerson | Organization | CareTeam)Who is the designated responsible party
... contributor 0..*Reference(Patient | Practitioner | PractitionerRole | Device | RelatedPerson | Organization | CareTeam)Who provided the content of the care plan
... careTeam 0..*Reference(CareTeam)Who's involved in plan?
... addresses Σ0..*Reference(Condition)Health issues this plan addresses
... supportingInfo 0..*Reference(Resource)Information considered as part of plan
... goal 0..*Reference(Goal)Desired outcome of plan
... activity C0..*BackboneElementAction to occur as part of plan
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... outcomeCodeableConcept 0..*CodeableConceptResults of the activity
Binding: CarePlanActivityOutcome (example): Identifies the results of the activity.


.... outcomeReference 0..*Reference(Resource)Appointment, Encounter, Procedure, etc.
.... progress 0..*AnnotationComments about the activity status/progress
.... reference C0..1Reference(Appointment | CommunicationRequest | DeviceRequest | MedicationRequest | NutritionOrder | Task | ServiceRequest | VisionPrescription | RequestGroup)Activity details defined in specific resource
.... detail C0..1BackboneElementIn-line definition of activity
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... kind 0..1codeAppointment | CommunicationRequest | DeviceRequest | MedicationRequest | NutritionOrder | Task | ServiceRequest | VisionPrescription
Binding: CarePlanActivityKind (required): Resource types defined as part of FHIR that can be represented as in-line definitions of a care plan activity.

..... instantiatesCanonical 0..*canonical(PlanDefinition | ActivityDefinition | Questionnaire | Measure | OperationDefinition)Instantiates FHIR protocol or definition
..... instantiatesUri 0..*uriInstantiates external protocol or definition
..... code 0..1CodeableConceptDetail type of activity
Binding: ProcedureCodes(SNOMEDCT) (example): Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.

..... reasonCode 0..*CodeableConceptWhy activity should be done or why activity was prohibited
Binding: SNOMEDCTClinicalFindings (example): Identifies why a care plan activity is needed. Can include any health condition codes as well as such concepts as "general wellness", prophylaxis, surgical preparation, etc.


..... reasonReference 0..*Reference(Condition | Observation | DiagnosticReport | DocumentReference)Why activity is needed
..... goal 0..*Reference(Goal)Goals this activity relates to
..... status ?!1..1codenot-started | scheduled | in-progress | on-hold | completed | cancelled | stopped | unknown | entered-in-error
Binding: CarePlanActivityStatus (required): Codes that reflect the current state of a care plan activity within its overall life cycle.

..... statusReason 0..1CodeableConceptReason for current status
..... doNotPerform ?!0..1booleanIf true, activity is prohibiting action
..... scheduled[x] 0..1When activity is to occur
...... scheduledTimingTiming
...... scheduledPeriodPeriod
...... scheduledStringstring
..... location 0..1Reference(Location)Where it should happen
..... performer 0..*Reference(Practitioner | PractitionerRole | Organization | RelatedPerson | Patient | CareTeam | HealthcareService | Device)Who will be responsible?
..... product[x] 0..1What is to be administered/supplied
Binding: SNOMEDCTMedicationCodes (example): A product supplied or administered as part of a care plan activity.

...... productCodeableConceptCodeableConcept
...... productReferenceReference(Medication | Substance)
..... dailyAmount 0..1SimpleQuantityHow to consume/day?
..... quantity 0..1SimpleQuantityHow much to administer/supply/consume
..... description 0..1stringExtra info describing activity to perform
... note 0..*AnnotationComments about the plan

doco Documentation for this format

Terminology Bindings

PathConformanceValueSet
CarePlan.languagepreferredCommonLanguages
Additional Bindings Purpose
AllLanguages Max Binding
CarePlan.statusrequiredRequestStatus
CarePlan.intentrequiredCarePlanIntent
CarePlan.categoryexampleCarePlanCategory
CarePlan.activity.outcomeCodeableConceptexampleCarePlanActivityOutcome
CarePlan.activity.detail.kindrequiredCarePlanActivityKind
CarePlan.activity.detail.codeexampleProcedureCodes(SNOMEDCT)
CarePlan.activity.detail.reasonCodeexampleSNOMEDCTClinicalFindings
CarePlan.activity.detail.statusrequiredCarePlanActivityStatus
CarePlan.activity.detail.product[x]exampleSNOMEDCTMedicationCodes

This structure is derived from CarePlan

Summary

Mandatory: 1 element
Must-Support: 5 elements

Structures

This structure refers to these other structures:

Maturity: 0

Differential View

This structure is derived from CarePlan

NameFlagsCard.TypeDescription & Constraintsdoco
.. CarePlan 0..*CarePlanHealthcare plan for patient or group
... identifier S0..*IdentifierExternal Ids for this plan
... status S1..1codedraft | active | on-hold | revoked | completed | entered-in-error | unknown
... intent S1..1codeproposal | plan | order | option
... subject S1..1Reference(AU Core Patient)Who the care plan is for

doco Documentation for this format

Key Elements View

NameFlagsCard.TypeDescription & Constraintsdoco
.. CarePlan 0..*CarePlanHealthcare plan for patient or group
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
... identifier SΣ0..*IdentifierExternal Ids for this plan
... intent ?!SΣ1..1codeproposal | plan | order | option
Binding: CarePlanIntent (required): Codes indicating the degree of authority/intentionality associated with a care plan.

... category SΣ0..*CodeableConceptType of plan
Binding: CarePlanCategory (example): Identifies what "kind" of plan this is to support differentiation between multiple co-existing plans; e.g. "Home health", "psychiatric", "asthma", "disease management", etc.


... subject SΣ1..1Reference(AU Core Patient)Who the care plan is for

doco Documentation for this format

Terminology Bindings

PathConformanceValueSet
CarePlan.statusrequiredRequestStatus
CarePlan.intentrequiredCarePlanIntent
CarePlan.categoryexampleCarePlanCategory

Snapshot View

NameFlagsCard.TypeDescription & Constraintsdoco
.. CarePlan 0..*CarePlanHealthcare plan for patient or group
... id Σ0..1idLogical id of this artifact
... meta Σ0..1MetaMetadata about the resource
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... language 0..1codeLanguage of the resource content
Binding: CommonLanguages (preferred): A human language.

Additional BindingsPurpose
AllLanguagesMax Binding
... text 0..1NarrativeText summary of the resource, for human interpretation
... contained 0..*ResourceContained, inline Resources
... extension 0..*ExtensionAdditional content defined by implementations
... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
... identifier SΣ0..*IdentifierExternal Ids for this plan
... instantiatesCanonical Σ0..*canonical(PlanDefinition | Questionnaire | Measure | ActivityDefinition | OperationDefinition)Instantiates FHIR protocol or definition
... instantiatesUri Σ0..*uriInstantiates external protocol or definition
... basedOn Σ0..*Reference(CarePlan)Fulfills CarePlan
... replaces Σ0..*Reference(CarePlan)CarePlan replaced by this CarePlan
... partOf Σ0..*Reference(CarePlan)Part of referenced CarePlan
... status ?!SΣ1..1codedraft | active | on-hold | revoked | completed | entered-in-error | unknown
Binding: RequestStatus (required): Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.

... intent ?!SΣ1..1codeproposal | plan | order | option
Binding: CarePlanIntent (required): Codes indicating the degree of authority/intentionality associated with a care plan.

... category SΣ0..*CodeableConceptType of plan
Binding: CarePlanCategory (example): Identifies what "kind" of plan this is to support differentiation between multiple co-existing plans; e.g. "Home health", "psychiatric", "asthma", "disease management", etc.


... title Σ0..1stringHuman-friendly name for the care plan
... description Σ0..1stringSummary of nature of plan
... subject SΣ1..1Reference(AU Core Patient)Who the care plan is for
... encounter Σ0..1Reference(Encounter)Encounter created as part of
... period Σ0..1PeriodTime period plan covers
... created Σ0..1dateTimeDate record was first recorded
... author Σ0..1Reference(Patient | Practitioner | PractitionerRole | Device | RelatedPerson | Organization | CareTeam)Who is the designated responsible party
... contributor 0..*Reference(Patient | Practitioner | PractitionerRole | Device | RelatedPerson | Organization | CareTeam)Who provided the content of the care plan
... careTeam 0..*Reference(CareTeam)Who's involved in plan?
... addresses Σ0..*Reference(Condition)Health issues this plan addresses
... supportingInfo 0..*Reference(Resource)Information considered as part of plan
... goal 0..*Reference(Goal)Desired outcome of plan
... activity C0..*BackboneElementAction to occur as part of plan
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... outcomeCodeableConcept 0..*CodeableConceptResults of the activity
Binding: CarePlanActivityOutcome (example): Identifies the results of the activity.


.... outcomeReference 0..*Reference(Resource)Appointment, Encounter, Procedure, etc.
.... progress 0..*AnnotationComments about the activity status/progress
.... reference C0..1Reference(Appointment | CommunicationRequest | DeviceRequest | MedicationRequest | NutritionOrder | Task | ServiceRequest | VisionPrescription | RequestGroup)Activity details defined in specific resource
.... detail C0..1BackboneElementIn-line definition of activity
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... kind 0..1codeAppointment | CommunicationRequest | DeviceRequest | MedicationRequest | NutritionOrder | Task | ServiceRequest | VisionPrescription
Binding: CarePlanActivityKind (required): Resource types defined as part of FHIR that can be represented as in-line definitions of a care plan activity.

..... instantiatesCanonical 0..*canonical(PlanDefinition | ActivityDefinition | Questionnaire | Measure | OperationDefinition)Instantiates FHIR protocol or definition
..... instantiatesUri 0..*uriInstantiates external protocol or definition
..... code 0..1CodeableConceptDetail type of activity
Binding: ProcedureCodes(SNOMEDCT) (example): Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.

..... reasonCode 0..*CodeableConceptWhy activity should be done or why activity was prohibited
Binding: SNOMEDCTClinicalFindings (example): Identifies why a care plan activity is needed. Can include any health condition codes as well as such concepts as "general wellness", prophylaxis, surgical preparation, etc.


..... reasonReference 0..*Reference(Condition | Observation | DiagnosticReport | DocumentReference)Why activity is needed
..... goal 0..*Reference(Goal)Goals this activity relates to
..... status ?!1..1codenot-started | scheduled | in-progress | on-hold | completed | cancelled | stopped | unknown | entered-in-error
Binding: CarePlanActivityStatus (required): Codes that reflect the current state of a care plan activity within its overall life cycle.

..... statusReason 0..1CodeableConceptReason for current status
..... doNotPerform ?!0..1booleanIf true, activity is prohibiting action
..... scheduled[x] 0..1When activity is to occur
...... scheduledTimingTiming
...... scheduledPeriodPeriod
...... scheduledStringstring
..... location 0..1Reference(Location)Where it should happen
..... performer 0..*Reference(Practitioner | PractitionerRole | Organization | RelatedPerson | Patient | CareTeam | HealthcareService | Device)Who will be responsible?
..... product[x] 0..1What is to be administered/supplied
Binding: SNOMEDCTMedicationCodes (example): A product supplied or administered as part of a care plan activity.

...... productCodeableConceptCodeableConcept
...... productReferenceReference(Medication | Substance)
..... dailyAmount 0..1SimpleQuantityHow to consume/day?
..... quantity 0..1SimpleQuantityHow much to administer/supply/consume
..... description 0..1stringExtra info describing activity to perform
... note 0..*AnnotationComments about the plan

doco Documentation for this format

Terminology Bindings

PathConformanceValueSet
CarePlan.languagepreferredCommonLanguages
Additional Bindings Purpose
AllLanguages Max Binding
CarePlan.statusrequiredRequestStatus
CarePlan.intentrequiredCarePlanIntent
CarePlan.categoryexampleCarePlanCategory
CarePlan.activity.outcomeCodeableConceptexampleCarePlanActivityOutcome
CarePlan.activity.detail.kindrequiredCarePlanActivityKind
CarePlan.activity.detail.codeexampleProcedureCodes(SNOMEDCT)
CarePlan.activity.detail.reasonCodeexampleSNOMEDCTClinicalFindings
CarePlan.activity.detail.statusrequiredCarePlanActivityStatus
CarePlan.activity.detail.product[x]exampleSNOMEDCTMedicationCodes

This structure is derived from CarePlan

Summary

Mandatory: 1 element
Must-Support: 5 elements

Structures

This structure refers to these other structures:

Maturity: 0

 

Other representations of profile: CSV, Excel, Schematron

Notes:

Below is an overview of the mandatory and optional search parameters and combined search parameters. FHIR search operations and the syntax used to describe the interactions is described here.

Any search parameter defined in FHIR may be ‘allowed’ by the system unless explicitly marked as “SHALL NOT”. A few items are marked as MAY in this implementation guide to highlight their potential relevance.

Parameter(s) Conformance Type(s) Requirements (when used alone or in combination)
patient SHALL reference The client SHALL provide at least an id value and MAY provide both the Type and id values. The server SHALL support both.
patient+category SHALL reference+token
patient+category+date SHOULD reference+token+date
patient+category+status SHOULD reference+token+token
patient+category+status+date SHOULD reference+token+token+date
patient.identifier SHOULD reference.token The client SHALL provide both the system and code values. The server SHALL support both.

The client SHOULD support search using IHI, Medicare Number, and DVA Number identifiers as defined in the AU Core Patient profile. The server SHOULD support search using the using IHI, Medicare Number, and DVA Number identifiers as defined in the AU Core Patient profile.
category MAY token The client SHALL provide at least a code value and MAY provide both the system and code values. The server SHALL support both.
date MAY date A client SHALL provide a value precise to the second + time offset. A server SHALL support a value precise to the second + time offset.
status MAY token The client SHALL provide at least a code value and MAY provide both the system and code values. The server SHALL support both.

Mandatory Search Parameters

The following search parameters and search parameter combinations SHALL be supported:

  1. SHALL support searching using the patient search parameter:
    • SHALL support these _revinclude parameters: Provenance:target
    • SHOULD support chained searching of patient canonical identifier patient.identifier (e.g. patient.identifier=[system|][code])

    GET [base]/CarePlan?patient={Type/}[id] or optionally GET [base]/CarePlan?patient.identifier=[system|][code]

    Example:

    1. GET [base]/CarePlan?patient=5678
    2. GET [base]/CarePlan?patient.identifier=http://ns.electronichealth.net.au/id/medicare-number|32788511952
    3. GET [base]/CarePlan?patient.identifier=http://ns.electronichealth.net.au/id/hi/ihi/1.0|8003608833357361

    Implementation Notes: Fetches a bundle of all CarePlan resources for the specified patient (how to search by reference and how to search by token)

  2. SHALL support searching using the combination of the patient and category search parameters:
    • SHALL support these _revinclude parameters: Provenance:target
    • SHOULD support chained searching of patient canonical identifier patient.identifier (e.g. patient.identifier=[system|][code])

    GET [base]/CarePlan?patient={Type/}[id]&category={system|}[code]

    Example:

    1. GET [base]/CarePlan?patient=5678&category=http://snomed.info/sct|736248007
    2. GET [base]/CarePlan?patient=5678&category=http://snomed.info/sct|736248007&_revinclude=Provenance:target

    Implementation Notes: Fetches a bundle of all CarePlan resources for the specified patient and a category code = 736248007 (how to search by reference and how to search by token)

Optional Search Parameters

The following search parameters and search parameter combinations SHOULD be supported:

  1. SHOULD support searching using the combination of the patient and category and date search parameters:
    • SHALL support these _revinclude parameters: Provenance:target
    • SHOULD support chained searching of patient canonical identifier patient.identifier (e.g. patient.identifier=[system|][code])
    • SHALL support these date comparators: gt,lt,ge,le
    • SHOULD support multipleAnd search on date (e.g.date=[date]&date=[date]]&...)

    GET [base]/CarePlan?patient={Type/}[id]&category={system|}[code]&date={gt|lt|ge|le}[date]{&date={gt|lt|ge|le}[date]&...}

    Example:

    1. GET [base]/CarePlan?patient=5678&category=http://snomed.info/sct|736248007&date=ge2020-01-01T00:00:00Z

    Implementation Notes: Fetches a bundle of all CarePlan resources for the specified patient and date and a category code = 736248007 (how to search by reference and how to search by token and how to search by date)

  2. SHOULD support searching using the combination of the patient and category and status search parameters:
    • SHALL support these _revinclude parameters: Provenance:target
    • SHALL support multipleOr search on status (e.g.status={system|}[code],{system|}[code],...)

    GET [base]/CarePlan?patient={Type/}[id]&category={system|}[code]&status={system|}[code]{,{system|}[code],...}

    Example:

    1. GET [base]/CarePlan?patient=5678&category=http://snomed.info/sct|736248007&status=active

    Implementation Notes: Fetches a bundle of all CarePlan resources for the specified patient and category and status (how to search by reference and how to search by token)

  3. SHOULD support searching using the combination of the patient and category and status and date search parameters:
    • SHALL support these _revinclude parameters: Provenance:target
    • SHOULD support chained searching of patient canonical identifier patient.identifier (e.g. patient.identifier=[system|][code])
    • SHALL support multipleOr search on status (e.g.status={system|}[code],{system|}[code],...)
    • SHALL support these date comparators: gt,lt,ge,le
    • SHOULD support multipleAnd search on date (e.g.date=[date]&date=[date]]&...)

    GET [base]/CarePlan?patient={Type/}[id]&category={system|}[code]&status={system|}[code]{,{system|}[code],...}&date={gt|lt|ge|le}[date]{&date={gt|lt|ge|le}[date]&...}

    Example:

    1. GET [base]/CarePlan?patient=5678&category=http://snomed.info/sct|736248007&status=active&date=ge2020-01-01T00:00:00Z

    Implementation Notes: Fetches a bundle of all CarePlan resources for the specified patient and category and status (how to search by reference and how to search by token) and how to search by date)