2

I want to develop an EHR but I am stuck at the medication autocompleting functionality by typing the medication name in input box using one of the api's that I mentioned at the title of this question so, I want to type medication name for example 'zoco' the system must make request to an api (that I don't know which one) of them so the api should response me with list of approximate medication name matches in JSON format like:

{
rxcui: "196503",
name: "Zocor",
synonym: "",
tty: "BN",
language: "ENG",
suppress: "N",
umlscui: "C0678181"
},
{
rxcui: "317541",
name: "Oral Tablet",
synonym: "",
tty: "DF",
language: "ENG",
suppress: "N",
umlscui: "C0993159"
},
{
rxcui: "104490",
name: "Simvastatin 10 MG Oral Tablet [Zocor]",
synonym: "Zocor 10 MG Oral Tablet",
tty: "SBD",
language: "ENG",
suppress: "N",
umlscui: "C0354662"
},
{
rxcui: "563653",
name: "Simvastatin 10 MG [Zocor]",
synonym: "",
tty: "SBDC",
language: "ENG",
suppress: "N",
umlscui: "C1596095"
}
user2620132
  • 155
  • 1
  • 1
  • 10

1 Answers1

2

Look at the ValueSet/$expand operation. Just keep invoking it with a new filter as the patient types. It's already been used in production for auto-complete purposes

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • @LIody McKenzie can you give an example like I saw in https://app.drchrono.com/ EHR when you write the first character of a drug name the drchrono EHR make a list of approximate drug name match list. – user2620132 Feb 28 '17 at 03:22
  • http://fhir3.healthintersections.com.au/open/ValueSet/medication-codes$expand?filter=zoco Though Grahame's server is down right now as he upgrades to final STU 3 - so it may not work until later today or sometime tomorrow – Lloyd McKenzie Feb 28 '17 at 14:44