Skip to content

Instantly share code, notes, and snippets.

@mustmodify
Last active September 26, 2019 14:18
Show Gist options
  • Save mustmodify/a9dcf437c67f49b07e7ab60ef4a7aac9 to your computer and use it in GitHub Desktop.
Save mustmodify/a9dcf437c67f49b07e7ab60ef4a7aac9 to your computer and use it in GitHub Desktop.

while expositing, if:

  • there is no matching code/compendium
  • Or there is a matching compendium/code AND it IS NOT marked 'ignorable' AND it DOES NOT have a noumenon yet

then:

  1. create an oddity as normal.
  2. Also, POST to lexicon.physioagereporting.com/code_pairs.json with the following params:
{'code_pair': {
  first_identifier: '...',
  first_description: '...',
  first_codeset: '...',
  second_identifier: '...',
  second_description: '...',
  second_codeset: '...'
}}

If you aren't familiar with the 'nested parameters' thing above, Rails uses [brackets] to do that.

So "code_pair[first_identifier]" would be the first key.

Here's a recent example of a code pair received by the lex:

"code_pair"=>{"first_codeset"=>"labcorp.com", "first_description"=>"HHV 6 IgG Antibodies", "first_identifier"=>"161076", "second_codeset"=>"LOINC", "second_description"=>"Herpes virus 6 Ab.IgG", "second_identifier"=>"41148-8"}}

References

a stack overflow about dot-net-to-rails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment