ch-core icon indicating copy to clipboard operation
ch-core copied to clipboard

Is slicing on $this correct?

Open jkiddo opened this issue 1 year ago • 3 comments

Shouldn't https://github.com/hl7ch/ch-core/blob/944e7bf370ef629d8d72f2bef1dc167da0b7d3b6/input/fsh/profiles-resources/CHCoreOrganization.fsh#L9C15-L9C41 have been system instead of $this?

jkiddo avatar Dec 05 '24 13:12 jkiddo

The idea behind using $this is to allow for example ONLY type to serve as a discriminator for an additional identifier slice, alongside system, as we have it in the CH Core Patient profile for identifier.

Proposal to leave the slicing as it is to be discussed at an FHIR telco.

ziegm avatar Dec 05 '24 13:12 ziegm

then you are technically allowing multiple identifieres with the same system which would be a bit weird, IMHO.

jkiddo avatar Mar 11 '25 15:03 jkiddo

then you are technically allowing multiple identifieres with the same system which would be a bit weird, IMHO.

yes, but you would need to differentiate (e.g. int the type) that it could be used as slices.

Telco: we don't see added value of switching just to the system discriminator, @jkiddo do you have an issue with that if we stay the way it is?

oliveregger avatar Apr 09 '25 12:04 oliveregger

Do you have a case where the system doesnt implicitly points to a type?

jkiddo avatar Aug 21 '25 12:08 jkiddo

Do you have a case where the system doesnt implicitly points to a type?

maybe a local organization identifier (like the local PID for pat):

{
 "identifier": [
   {
     "type": {
       "coding": [
         {
           "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
           "code": "XX"
         }
       ]
     },
     "system": "http://hospital-group-abc.ch/local-identifier",
     "value": "LOCAL-ORG-001"
   }
 ]
}

Using $this as the discriminator in the core profile provides flexibility for derived profiles compared to system-only discrimination. While system-based slicing locks derived profiles into the same discrimination pattern, $this enables derived profiles to slice by any combination of identifier elements (system, type, use, value patterns) as needed for their specific use cases.

ziegm avatar Aug 25 '25 12:08 ziegm

I'm yet to see a case where it doesn't make sense to use system for identifiers. If you prefer to stick with $this, then do so, and you can close this issue.

jkiddo avatar Aug 25 '25 14:08 jkiddo

Since we currently have no specific use case for identifiers with slicing via type, we will switch to the system as requested by @jkiddo.

ziegm avatar Sep 04 '25 10:09 ziegm

fixed with #389

oliveregger avatar Nov 12 '25 20:11 oliveregger