0

When we are creating DiagnosticReport or Observation or Allergy or any other resource how to capture, who is creating this resource in the app. whether it is Patient or Practitioner? How to differentiate the "createdBy". I couldnt map a field for this purpose.

sowmiyaksr
  • 169
  • 5
  • 18

1 Answers1

1

Without resolving the resource reference, you can't know. There's some discussion about adding "resource type" to the Reference data type. So far it's been excluded as redundant, but you're welcome to submit a change request ("propose a change" link at the bottom of each page in the spec) asking for that.

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • Sure. Thank you :-) – sowmiyaksr Oct 12 '17 at 12:42
  • If a reference is given - disregarding references to contained resources, isn't the resource type always a part of that reference value? That would make an extra feld for resource type redundant indeed. Parsing the reference could give you the information you need then. – Mirjam Baltus Oct 13 '17 at 08:08
  • If it's a RESTful reference, yes, you could parse the URL to extract the type. For references inside a Bundle, that's not the case, but within a Bundle, it's easy enough to go look. Which is why, so far, we've said it's redundant. – Lloyd McKenzie Oct 13 '17 at 15:35