Activity ID

I’d appreciate some advice please.

In situations where multiple activities are required, I can see in the EHR Information Model specs where the corresponding ACTION for each Activity is identified (action_archetype_id in the ACTIVITY Class for an INSTRUCTION) .
And I can see an ‘instruction_id’ in the ACTION - specifically the INSTRUCTION_DETAILS Class - identifying the source INSTRUCTION as a whole.

However, I can’t see an ‘Activity_id’ or similar that would identify one specific Activity out of a group of Activities within a single INSTRUCTION.

Consider a group of tests ordered within a single Service request, and being able to track that ‘Test A’, identified by its’ unique ID is still outstanding, but the others have been finalised and reported.

Do we need to model ‘Activity ID’ or similar in each Activity for an INSTRUCTION archetype?

1 Like

Hi Heather,
ACTIVITY inherits from LOCATABLE, so it gets the name field, which is usually used for this kind of thing. name can be archetyped to be a coded term or just a normal DV_TEXT.

Does this work when exchanging data, for example for lab test activities? Alternatively, could the uid element from LOCATABLE be used for a unique ID for the ACTIVITY?

1 Like

Agree. The ID is what we are after.

@thomas.beale Clearly it has not been missed, yet the solution is obscure and relies on deep knowledge of the specs. I suggest the specs should be updated to include your explanation in the documentation of ACTIVITY_CLASS so others can find it too.

This seems like a better idea. Since the ID may be more stable than a name. There could be a use cases for editing the name of an activity after it’s been recorded. Although it might be rare enough not to bother.

I agree a spec update would be nice. But we may also be able to help at the archetype level by specialising the rm attribute id into something like activity ID. That would make it clearer for users of the specific archetype.

Completely agree. I’ll raise a PR - or you can if you want - it will have your name on it, which is better. You can do it here.

Technically, the UID field could be set and that would create an id. Good for computers, terrible for humans. I’d suggest for the clinical modellers to have a think about how:

  • such ids would come into being in the first place - e.g. computer-assigned or maybe named at runtime by user
  • would it be better to have a short id rather than a GUID (whcih is long and not memorable at all)
  • what computing would be done with the ids
  • realistically, within a given INSTRUCTION how many ACTIVITYs could there be? If it’s 99.9% of the time, just one, and 0.01% of the time, 2 or 3 (or let’s say < 5), GUIDs are probably overkill
  • on the other hand, a GUID will identify the ACTIVITY globally, where as a simple human readable id won’t - but does this matter?
  • consider the straw man: why not identify them ordinally, i.e. 1, 2, 3. Find reasons why this would not work.

There are probably other issues to consider but those come to mind right now.