Date range search is not working

145 views
Skip to first unread message

nisha ks

unread,
May 25, 2020, 2:56:10 AM5/25/20
to HAPI FHIR
Hi,

I am using HAPI FHIR r4, downloaded server and client from hapi fhir git repository ("https://github.com/hapifhir/hapi-fhir-jpaserver-starter")
I tried date attribute search from thr UI as shown in below image. and I got proper response. But the problem is I am not able to prove date with time and timezone. I tried with postman client also still the same issue. Only date search is working fine, but search with datetime and timezone is not working.


This query is not working. But if I prove only dates, it is working.

Can some one please tell me if I am doing something wrong here?

Screenshot 2020-05-25 at 12.22.30 PM.png




nisha ks

unread,
May 25, 2020, 5:00:58 AM5/25/20
to HAPI FHIR
I tries with all possibilities from "http://hl7.org/fhir/r4/search.html#date" but no luck.
Also period search is not working properly. I mean, If an encounter started on 2020-04-03T00:00:00 and is still going on , If i search for date>= 2020-05-03T00:00:00 should also list the above mentioned encounter right?But that is not happening. So I tried with sa and eb  ([parameter]=sa2013-03-14 & [parameter]=seb013-03-14 ) tags in search that also did not work. 

Can some one please help me with this issue. I am literally stuck.

James Agnew

unread,
May 25, 2020, 5:52:13 AM5/25/20
to nisha ks, HAPI FHIR
Hi Nisha,

Could you please provide an example query URL using the hapi.fhir.org server, as well as a link to a resource you are expecting it to match?

Cheers,
James

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/dcca390e-01d3-453e-b820-52240f7f5fae%40googlegroups.com.

nisha ks

unread,
May 25, 2020, 6:39:10 AM5/25/20
to HAPI FHIR
Hi James,

Thanks for the quick response. Please find the details below.

Query 1 : http://ec2-13-232-121-232.ap-south-1.compute.amazonaws.com:9099/fhir/Encounter?status=arrived&date=>=2020-03-23T19:00:00&date=<=2020-03-23T20:00:00&service-provider=52

This query works because I have encounter which have starttime matching

Response : {
  "resourceType""Bundle",
  "id""07790d28-58df-45a5-8383-a054557202b8",
  "meta": {
    "lastUpdated""2020-05-25T10:37:48.459+00:00"
  },
  "type""searchset",
  "total"3,
  "link": [
    {
      "relation""self",
    }
  ],
  "entry": [
    {
      "fullUrl""http://localhost:9099/fhir/Encounter/107",
      "resource": {
        "resourceType""Encounter",
        "id""107",
        "meta": {
          "versionId""2",
          "lastUpdated""2020-03-23T18:28:02.188+00:00",
          "source""#f0MXiK4oyfzvkD6S"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Admission"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/62"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/105"
          }
        ],
        "period": {
          "start""2020-03-23T19:44:00+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/57"
            },
            "status""active",
            "period": {
              "start""2020-03-23T19:44:00+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "fullUrl""http://localhost:9099/fhir/Encounter/108",
      "resource": {
        "resourceType""Encounter",
        "id""108",
        "meta": {
          "versionId""1",
          "lastUpdated""2020-03-23T18:31:16.379+00:00",
          "source""#R211yxgKKbFRz0Q5"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Admission"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/61"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/106"
          }
        ],
        "period": {
          "start""2020-03-23T19:44:00+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/56"
            },
            "status""active",
            "period": {
              "start""2020-03-23T19:44:00+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "fullUrl""http://localhost:9099/fhir/Encounter/110",
      "resource": {
        "resourceType""Encounter",
        "id""110",
        "meta": {
          "versionId""1",
          "lastUpdated""2020-03-23T18:34:53.960+00:00",
          "source""#Z8cK2BrTfjF6jXOc"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Admission"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/59"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/103"
          }
        ],
        "period": {
          "start""2020-03-23T19:44:00+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/54"
            },
            "status""active",
            "period": {
              "start""2020-03-23T19:44:00+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    }
  ]
}


Query 2: 
http://ec2-13-232-121-232.ap-south-1.compute.amazonaws.com:9099/fhir/Encounter?status=arrived&date=>=2020-03-23T20:00:00&date=<=2020-03-23T21:00:00&service-provider=52

But this query doesn't work, I don't have any encounters which have startdatetime in between the mentioned period

Response : 
{
  "resourceType""Bundle",
  "id""e4776353-7f9c-4a18-9d4f-3c07520070fc",
  "meta": {
    "lastUpdated""2020-05-25T10:38:14.866+00:00"
  },
  "type""searchset",
  "total"0,
  "link": [
    {
      "relation""self",
    }
  ]
}

But issue is,  I am expecting the query 1 response in query 2 since the period is matching though start datetime is not matching.



On Monday, 25 May 2020 15:22:13 UTC+5:30, James Agnew wrote:
Hi Nisha,

Could you please provide an example query URL using the hapi.fhir.org server, as well as a link to a resource you are expecting it to match?

Cheers,
James

On Mon, May 25, 2020 at 5:01 AM nisha ks <nisha...@gmail.com> wrote:
I tries with all possibilities from "http://hl7.org/fhir/r4/search.html#date" but no luck.
Also period search is not working properly. I mean, If an encounter started on 2020-04-03T00:00:00 and is still going on , If i search for date>= 2020-05-03T00:00:00 should also list the above mentioned encounter right?But that is not happening. So I tried with sa and eb  ([parameter]=sa2013-03-14 & [parameter]=seb013-03-14 ) tags in search that also did not work. 

Can some one please help me with this issue. I am literally stuck.

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi...@googlegroups.com.

nisha ks

unread,
May 25, 2020, 6:45:45 AM5/25/20
to HAPI FHIR

Also just wanted to know if this is the expected behaviour or not . As per the spec document I felt this should be possible. But I didn't see any HAPI documents with date parameter containing datetime with timezone value. (Tried with and without timezone but both didn't work)

Followed the below documents:


and 

nisha ks

unread,
May 25, 2020, 7:33:52 AM5/25/20
to HAPI FHIR
Also 



Response : {
  "resourceType""Bundle",
  "id""aa9e5963-60bc-467e-91bf-73158bb38db0",
  "meta": {
    "lastUpdated""2020-05-25T11:30:17.331+00:00"
  },
  "type""searchset",
  "total"12,
  "link": [
    {
      "relation""self",
    }
  ],
  "entry": [
    {
      "resource": {
        "resourceType""Encounter",
        "id""3709",
        "meta": {
          "versionId""1",
          "lastUpdated""2020-05-25T07:59:42.987+00:00",
          "source""#2hYgGdZcp3D0zIr3"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Triage"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/3707"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/3708"
          }
        ],
        "period": {
          "start""2020-05-25T13:28:00"
        },
        "location": [
          {
            "location": {
              "reference""Location/3706"
            },
            "status""active",
            "period": {
              "start""2020-05-25T13:28:00"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "resource": {
        "resourceType""Encounter",
        "id""3705",
        "meta": {
          "versionId""1",
          "lastUpdated""2020-05-25T07:53:12.839+00:00",
          "source""#Bihe3IKMLPTkSxDl"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Triage"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/3703"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/3704"
          }
        ],
        "period": {
          "start""2020-05-25T13:20:55"
        },
        "location": [
          {
            "location": {
              "reference""Location/3702"
            },
            "status""active",
            "period": {
              "start""2020-05-25T13:20:55"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "resource": {
        "resourceType""Encounter",
        "id""1513",
        "meta": {
          "versionId""5",
          "lastUpdated""2020-05-22T08:22:56.012+00:00",
          "source""#ZbMKlTjEnzSKVrHj"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Triage"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/1511"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/undefined"
          }
        ],
        "period": {
          "start""2020-05-22T13:52:55+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/1510"
            },
            "status""active",
            "period": {
              "start""2020-05-22T13:52:55+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "resource": {
        "resourceType""Encounter",
        "id""1505",
        "meta": {
          "versionId""9",
          "lastUpdated""2020-05-22T08:22:24.135+00:00",
          "source""#3KNvRJYnpXXgVUgY"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""225390008",
                "display""Screened"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/1502"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/undefined"
          }
        ],
        "period": {
          "start""2020-05-22T13:52:24+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/1504"
            },
            "status""active",
            "period": {
              "start""2020-05-22T13:52:24+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "fullUrl""http://localhost:9099/fhir/Encounter/109",
      "resource": {
        "resourceType""Encounter",
        "id""109",
        "meta": {
          "versionId""14",
          "lastUpdated""2020-05-14T11:46:57.177+00:00",
          "source""#FUbQFMFDGYBWpLBO"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""225390008",
                "display""Screened"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/60"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/undefined"
          }
        ],
        "period": {
          "start""2020-05-14T11:46:57+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/55"
            },
            "status""active",
            "period": {
              "start""2020-05-14T11:46:57+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "fullUrl""http://localhost:9099/fhir/Encounter/111",
      "resource": {
        "resourceType""Encounter",
        "id""111",
        "meta": {
          "versionId""95",
          "lastUpdated""2020-05-22T08:21:49.425+00:00",
          "source""#Hf64AowSdy2jHSiM"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""171111007",
                "display""Monitoring"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/58"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/undefined"
          }
        ],
        "period": {
          "start""2020-05-22T13:51:49+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/53"
            },
            "status""active",
            "period": {
              "start""2020-05-22T13:51:49+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "fullUrl""http://localhost:9099/fhir/Encounter/568",
      "resource": {
        "resourceType""Encounter",
        "id""568",
        "meta": {
          "versionId""1",
          "lastUpdated""2020-04-02T12:53:04.728+00:00",
          "source""#NxAKzTzvrc6NAr6d"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Admission"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""133933007",
              "display""Newborn"
            }
          ]
        },
        "subject": {
          "reference""Patient/558"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/563"
          }
        ],
        "period": {
          "start""2020-04-02T10:44:00+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/557"
            },
            "status""active",
            "period": {
              "start""2020-04-02T12:44:00+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "fullUrl""http://localhost:9099/fhir/Encounter/569",
      "resource": {
        "resourceType""Encounter",
        "id""569",
        "meta": {
          "versionId""1",
          "lastUpdated""2020-04-02T12:54:13.987+00:00",
          "source""#EYlBNjDRyjM38RKd"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Admission"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""133933007",
              "display""Newborn"
            }
          ]
        },
        "subject": {
          "reference""Patient/559"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/564"
          }
        ],
        "period": {
          "start""2020-04-02T10:50:00+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/556"
            },
            "status""active",
            "period": {
              "start""2020-04-02T12:50:00+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "fullUrl""http://localhost:9099/fhir/Encounter/570",
      "resource": {
        "resourceType""Encounter",
        "id""570",
        "meta": {
          "versionId""1",
          "lastUpdated""2020-04-02T12:57:53.560+00:00",
          "source""#XN9yd4y3aGqdufH5"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Admission"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""133933007",
              "display""Newborn"
            }
          ]
        },
        "subject": {
          "reference""Patient/560"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/565"
          }
        ],
        "period": {
          "start""2020-04-02T10:50:00+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/555"
            },
            "status""active",
            "period": {
              "start""2020-04-02T12:50:00+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "fullUrl""http://localhost:9099/fhir/Encounter/571",
      "resource": {
        "resourceType""Encounter",
        "id""571",
        "meta": {
          "versionId""2",
          "lastUpdated""2020-04-06T14:36:13.146+00:00",
          "source""#13oGjvrepTqrgefG"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Admission"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""133933007",
              "display""Newborn"
            }
          ]
        },
        "subject": {
          "reference""Patient/562"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/567"
          }
        ],
        "period": {
          "start""2020-04-05T06:00:00+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/553"
            },
            "status""active",
            "period": {
              "start""2020-04-05T06:00:00+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "fullUrl""http://localhost:9099/fhir/Encounter/572",
      "resource": {
        "resourceType""Encounter",
        "id""572",
        "meta": {
          "versionId""1",
          "lastUpdated""2020-04-02T13:01:57.057+00:00",
          "source""#ohuCPBHk4PcoTQ1n"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Admission"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/561"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/566"
          }
        ],
        "period": {
          "start""2020-04-02T10:50:00+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/554"
            },
            "status""active",
            "period": {
              "start""2020-04-02T12:50:00+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "resource": {
        "resourceType""Encounter",
        "id""1406",
        "meta": {
          "versionId""34",
          "lastUpdated""2020-05-22T10:27:04.133+00:00",
          "source""#oBaW14y3nNv3celH"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""182991002",
                "display""Under Treatment"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/1402"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/undefined"
          }
        ],
        "period": {
          "start""2020-05-22T15:57:04+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/1408"
            },
            "status""active",
            "period": {
              "start""2020-05-22T15:57:04+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    }
  ]
}


Response :
{
  "resourceType""Bundle",
  "id""152de82f-8152-402d-a577-716527d7b607",
  "meta": {
    "lastUpdated""2020-05-25T11:30:49.792+00:00"
  },
  "type""searchset",
  "total"15,
  "link": [
    {
      "relation""self",
    }
  ],
  "entry": [
    {
      "resource": {
        "resourceType""Encounter",
        "id""3709",
        "meta": {
          "versionId""1",
          "lastUpdated""2020-05-25T07:59:42.987+00:00",
          "source""#2hYgGdZcp3D0zIr3"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Triage"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/3707"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/3708"
          }
        ],
        "period": {
          "start""2020-05-25T13:28:00"
        },
        "location": [
          {
            "location": {
              "reference""Location/3706"
            },
            "status""active",
            "period": {
              "start""2020-05-25T13:28:00"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "resource": {
        "resourceType""Encounter",
        "id""3705",
        "meta": {
          "versionId""1",
          "lastUpdated""2020-05-25T07:53:12.839+00:00",
          "source""#Bihe3IKMLPTkSxDl"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Triage"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/3703"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/3704"
          }
        ],
        "period": {
          "start""2020-05-25T13:20:55"
        },
        "location": [
          {
            "location": {
              "reference""Location/3702"
            },
            "status""active",
            "period": {
              "start""2020-05-25T13:20:55"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "resource": {
        "resourceType""Encounter",
        "id""1513",
        "meta": {
          "versionId""5",
          "lastUpdated""2020-05-22T08:22:56.012+00:00",
          "source""#ZbMKlTjEnzSKVrHj"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Triage"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/1511"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/undefined"
          }
        ],
        "period": {
          "start""2020-05-22T13:52:55+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/1510"
            },
            "status""active",
            "period": {
              "start""2020-05-22T13:52:55+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "resource": {
        "resourceType""Encounter",
        "id""1505",
        "meta": {
          "versionId""9",
          "lastUpdated""2020-05-22T08:22:24.135+00:00",
          "source""#3KNvRJYnpXXgVUgY"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""225390008",
                "display""Screened"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/1502"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/undefined"
          }
        ],
        "period": {
          "start""2020-05-22T13:52:24+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/1504"
            },
            "status""active",
            "period": {
              "start""2020-05-22T13:52:24+05:30"
      "fullUrl""http://localhost:9099/fhir/Encounter/109",
      "resource": {
        "resourceType""Encounter",
        "id""109",
        "meta": {
          "versionId""14",
          "lastUpdated""2020-05-14T11:46:57.177+00:00",
          "source""#FUbQFMFDGYBWpLBO"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""225390008",
                "display""Screened"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/60"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/undefined"
          }
        ],
        "period": {
          "start""2020-05-14T11:46:57+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/55"
            },
            "status""active",
            "period": {
              "start""2020-05-14T11:46:57+05:30"
    },
    {
      "fullUrl""http://localhost:9099/fhir/Encounter/111",
      "resource": {
        "resourceType""Encounter",
        "id""111",
        "meta": {
          "versionId""95",
          "lastUpdated""2020-05-22T08:21:49.425+00:00",
          "source""#Hf64AowSdy2jHSiM"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""171111007",
                "display""Monitoring"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/58"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/undefined"
          }
        ],
        "period": {
          "start""2020-05-22T13:51:49+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/53"
            },
            "status""active",
            "period": {
              "start""2020-05-22T13:51:49+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "fullUrl""http://localhost:9099/fhir/Encounter/568",
      "resource": {
        "resourceType""Encounter",
        "id""568",
        "meta": {
          "versionId""1",
          "lastUpdated""2020-04-02T12:53:04.728+00:00",
          "source""#NxAKzTzvrc6NAr6d"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Admission"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""133933007",
              "display""Newborn"
            }
          ]
        },
        "subject": {
          "reference""Patient/558"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/563"
          }
        ],
        "period": {
          "start""2020-04-02T10:44:00+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/557"
            },
            "status""active",
            "period": {
              "start""2020-04-02T12:44:00+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "fullUrl""http://localhost:9099/fhir/Encounter/569",
      "resource": {
        "resourceType""Encounter",
        "id""569",
        "meta": {
          "versionId""1",
          "lastUpdated""2020-04-02T12:54:13.987+00:00",
          "source""#EYlBNjDRyjM38RKd"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Admission"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""133933007",
              "display""Newborn"
            }
          ]
        },
        "subject": {
          "reference""Patient/559"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/564"
          }
        ],
        "period": {
          "start""2020-04-02T10:50:00+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/556"
            },
            "status""active",
            "period": {
              "start""2020-04-02T12:50:00+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "fullUrl""http://localhost:9099/fhir/Encounter/570",
      "resource": {
        "resourceType""Encounter",
        "id""570",
        "meta": {
          "versionId""1",
          "lastUpdated""2020-04-02T12:57:53.560+00:00",
          "source""#XN9yd4y3aGqdufH5"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Admission"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""133933007",
              "display""Newborn"
            }
          ]
        },
        "subject": {
          "reference""Patient/560"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/565"
          }
        ],
        "period": {
          "start""2020-04-02T10:50:00+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/555"
            },
            "status""active",
            "period": {
              "start""2020-04-02T12:50:00+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "fullUrl""http://localhost:9099/fhir/Encounter/571",
      "resource": {
        "resourceType""Encounter",
        "id""571",
        "meta": {
          "versionId""2",
          "lastUpdated""2020-04-06T14:36:13.146+00:00",
          "source""#13oGjvrepTqrgefG"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Admission"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""133933007",
              "display""Newborn"
            }
          ]
        },
        "subject": {
          "reference""Patient/562"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/567"
          }
        ],
        "period": {
          "start""2020-04-05T06:00:00+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/553"
            },
            "status""active",
            "period": {
              "start""2020-04-05T06:00:00+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "fullUrl""http://localhost:9099/fhir/Encounter/572",
      "resource": {
        "resourceType""Encounter",
        "id""572",
        "meta": {
          "versionId""1",
          "lastUpdated""2020-04-02T13:01:57.057+00:00",
          "source""#ohuCPBHk4PcoTQ1n"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""11429006",
                "display""Admission"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/561"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/566"
          }
        ],
        "period": {
          "start""2020-04-02T10:50:00+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/554"
            },
            "status""active",
            "period": {
              "start""2020-04-02T12:50:00+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    },
    {
      "resource": {
        "resourceType""Encounter",
        "id""1406",
        "meta": {
          "versionId""34",
          "lastUpdated""2020-05-22T10:27:04.133+00:00",
          "source""#oBaW14y3nNv3celH"
        },
        "status""arrived",
        "type": [
          {
            "coding": [
              {
                "system""http://snomed.info/sct",
                "code""182991002",
                "display""Under Treatment"
              }
            ]
          }
        ],
        "priority": {
          "coding": [
            {
              "system""http://snomed.info/sct",
              "code""17621005",
              "display""Emergency"
            }
          ]
        },
        "subject": {
          "reference""Patient/1402"
        },
        "episodeOfCare": [
          {
            "reference""EpisodeOfCare/undefined"
          }
        ],
        "period": {
          "start""2020-05-22T15:57:04+05:30"
        },
        "location": [
          {
            "location": {
              "reference""Location/1408"
            },
            "status""active",
            "period": {
              "start""2020-05-22T15:57:04+05:30"
            }
          }
        ],
        "serviceProvider": {
          "reference""Organization/52"
        }
      },
      "search": {
        "mode""match"
      }
    }
  ]
}
In query1, I am getting proper response, but query 2 i am getting wring response


nisha ks

unread,
May 25, 2020, 7:35:57 AM5/25/20
to HAPI FHIR

James Agnew

unread,
May 25, 2020, 9:12:28 AM5/25/20
to nisha ks, HAPI FHIR
Sorry, again: Could you please provide an example query URL using the hapi.fhir.org server, as well as a link to a resource you are expecting it to match?

Cheers,
James

To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/cce82374-8c70-465c-86a9-30a1bbfd1d5e%40googlegroups.com.

nisha ks

unread,
May 25, 2020, 10:08:49 AM5/25/20
to HAPI FHIR

James Agnew

unread,
May 25, 2020, 8:48:34 PM5/25/20
to nisha ks, HAPI FHIR
I'm sorry, I don't really know how else to ask this:

Could you please provide an example query URL using the hapi.fhir.org server (e.g. http://hapi.fhir.org.baseR4 - Not a different server), as well as a link to a resource you are expecting it to match?



--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.

nisha ks

unread,
May 25, 2020, 10:46:10 PM5/25/20
to HAPI FHIR
Hi James,

I am sorry I couldn't answer the question properly. I followed "https://github.com/hapifhir/hapi-fhir-jpaserver-starter" and its JPA Server,FHIR version r4 and changed only port number from the configurations file f.


I think this is what you wanted.

nisha ks

unread,
May 26, 2020, 12:52:03 PM5/26/20
to HAPI FHIR
Hi James,

Did you get a chance to look in to this?

James Agnew

unread,
May 26, 2020, 1:08:27 PM5/26/20
to nisha ks, HAPI FHIR
If you are able to create an example on hapi.fhir.org and supply the two links I mentioned, I would be happy to look at this.

Cheers,
James

On Tue, May 26, 2020 at 12:52 PM nisha ks <nisha...@gmail.com> wrote:
Hi James,

Did you get a chance to look in to this?

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.

nisha ks

unread,
May 26, 2020, 1:21:26 PM5/26/20
to HAPI FHIR
Sure will do that.


On Tuesday, 26 May 2020 22:38:27 UTC+5:30, James Agnew wrote:
If you are able to create an example on hapi.fhir.org and supply the two links I mentioned, I would be happy to look at this.

Cheers,
James

On Tue, May 26, 2020 at 12:52 PM nisha ks <nisha...@gmail.com> wrote:
Hi James,

Did you get a chance to look in to this?

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi...@googlegroups.com.

nisha ks

unread,
May 26, 2020, 1:50:41 PM5/26/20
to HAPI FHIR
Hi James,

Please find the details below.

We have created the resource in 'hapi.fhir.org ' server as you have mentioned. Please find the below url's

We created 2 Encounters for time " 2020-05-25T14:28:00+05:30 "  and "2020-05-25T15:28:00+05:30" (Encounter id's : 1173694 and 1173695)

Encounters:

Query 1 : worked


Query 2 : worked

http://hapi.fhir.org/baseR4/Encounter?status=arrived&date=>=2020-05-25T14:00:00+05:30&date=<=2020-05-25T16:00:00+05:30

Response :  got both the encounters in response

Query 3 : didn't work

http://hapi.fhir.org/baseR4/Encounter?status=arrived&date=>=2020-05-25T15:00:00+05:30&date=<=2020-05-25T16:00:00+05:30

Response : We got only 1 encounter. The one with time '2020-05-25T14:28:00+05:30' did not come in the response this query. Since the encounter started @ 2020-05-25T14:28:00+05:30 and is still not completed (period end datetime is not added and status is still arrived), should be shown in query 3 according to our spec .

 

James Agnew

unread,
May 26, 2020, 2:42:40 PM5/26/20
to nisha ks, HAPI FHIR
Confirmed and ticketed as issue #1871

Cheers,
James

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/1668252e-25c3-46bd-8faa-83b0177d621c%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages