diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 0349c382b..fd5721d20 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1 +1,2 @@
* Update core R5 code to v4.6.0 (breaking changes to questionnaire, concept map, and other resources that are less important to core)
+* Fix compartment definitions of ListResource.source and subject for R3 and R4
diff --git a/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/model/ListResource.java b/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/model/ListResource.java
index 3a48c081a..ed04b1bc3 100644
--- a/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/model/ListResource.java
+++ b/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/model/ListResource.java
@@ -38,6 +38,12 @@ import java.util.List;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
+import org.hl7.fhir.r5.model.Device;
+import org.hl7.fhir.r5.model.Group;
+import org.hl7.fhir.r5.model.Location;
+import org.hl7.fhir.r5.model.Patient;
+import org.hl7.fhir.r5.model.Practitioner;
+import org.hl7.fhir.r5.model.PractitionerRole;
import org.hl7.fhir.utilities.Utilities;
import ca.uhn.fhir.model.api.annotation.Block;
@@ -1755,7 +1761,7 @@ public class ListResource extends DomainResource {
* Path: List.subject
*
*/
- @SearchParamDefinition(name="subject", path="List.subject", description="If all resources have the same subject", type="reference", target={Device.class, Group.class, Location.class, Patient.class } )
+ @SearchParamDefinition(name="subject", path="List.subject", description="If all resources have the same subject", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Device.class, Group.class, Location.class, Patient.class } )
public static final String SP_SUBJECT = "subject";
/**
* Fluent Client search parameter constant for subject
@@ -1807,7 +1813,7 @@ public class ListResource extends DomainResource {
* Path: List.source
*
*/
- @SearchParamDefinition(name="source", path="List.source", description="Who and/or what defined the list contents (aka Author)", type="reference", target={Device.class, Patient.class, Practitioner.class } )
+ @SearchParamDefinition(name="source", path="List.source", description="Who and/or what defined the list contents (aka Author)", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Device.class, Patient.class, Practitioner.class } )
public static final String SP_SOURCE = "source";
/**
* Fluent Client search parameter constant for source
diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/ListResource.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/ListResource.java
index 120414399..b9169c401 100644
--- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/ListResource.java
+++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/ListResource.java
@@ -44,6 +44,12 @@ import ca.uhn.fhir.model.api.annotation.ChildOrder;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.Block;
import org.hl7.fhir.instance.model.api.*;
+import org.hl7.fhir.r5.model.Device;
+import org.hl7.fhir.r5.model.Group;
+import org.hl7.fhir.r5.model.Location;
+import org.hl7.fhir.r5.model.Patient;
+import org.hl7.fhir.r5.model.Practitioner;
+import org.hl7.fhir.r5.model.PractitionerRole;
import org.hl7.fhir.exceptions.FHIRException;
/**
* A list is a curated collection of resources.
@@ -1763,7 +1769,7 @@ public class ListResource extends DomainResource {
* Path: List.subject
*
*/
- @SearchParamDefinition(name="subject", path="List.subject", description="If all resources have the same subject", type="reference", target={Device.class, Group.class, Location.class, Patient.class } )
+ @SearchParamDefinition(name="subject", path="List.subject", description="If all resources have the same subject", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Device.class, Group.class, Location.class, Patient.class } )
public static final String SP_SUBJECT = "subject";
/**
* Fluent Client search parameter constant for subject
@@ -1815,7 +1821,7 @@ public class ListResource extends DomainResource {
* Path: List.source
*
*/
- @SearchParamDefinition(name="source", path="List.source", description="Who and/or what defined the list contents (aka Author)", type="reference", target={Device.class, Patient.class, Practitioner.class, PractitionerRole.class } )
+ @SearchParamDefinition(name="source", path="List.source", description="Who and/or what defined the list contents (aka Author)", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Device.class, Patient.class, Practitioner.class, PractitionerRole.class } )
public static final String SP_SOURCE = "source";
/**
* Fluent Client search parameter constant for source