Skip to content

Instantly share code, notes, and snippets.

@prb112
Created May 27, 2020 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prb112/cda2ed872375d6dc97ebc4258b3a469b to your computer and use it in GitHub Desktop.
Save prb112/cda2ed872375d6dc97ebc4258b3a469b to your computer and use it in GitHub Desktop.
select same code and type
$ for VALUE in `cat ./fhir-registry/definitions/search-parameters.json | jq -r '.entry[].resource | "\(.code),\(.type)"' | sort -u`
> do
> CUR_VALUE=`echo "${VALUE}" | sed 's|,| |g' | awk '{print $1}'`
> PRE_VALUE=`echo "${PREVIOUS_VALUE}" | sed 's|,| |g' | awk '{print $1}'`
> if [ "$PRE_VALUE" = "$CUR_VALUE" ]
> then
> echo "${VALUE}"
> echo "${PREVIOUS_VALUE}"
> fi
> PREVIOUS_VALUE=${VALUE}
> done
base,token
base,reference
contact,token
contact,string
context,token
context,reference
definition,uri
definition,reference
destination,string
destination,reference
facility,token
facility,reference
focus,token
focus,reference
location,token
location,reference
location,uri
location,token
lot-number,token
lot-number,string
manufacturer,string
manufacturer,reference
participant,uri
participant,reference
performer,token
performer,reference
relationship,token
relationship,composite
request,token
request,reference
resource,token
resource,reference
responsible,string
responsible,reference
result,token
result,reference
series,token
series,string
site,token
site,reference
source,string
source,reference
source,uri
source,string
source-uri,uri
source-uri,reference
start,token
start,date
system,uri
system,token
target,token
target,reference
type,uri
type,token
value,token
value,string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment