Repository: synthetichealth/synthea
Issue: Missing identifier in patient home's location resource

### What happened?

When pushing generated patients to a fhir server (after the locations have been pushed before), the patient's home location is referenced by its identifier even though the initially pushed patient's home doesn't have an identifier set. The request is therefore denied.

Here is the patient's home location as part of the generated location resource bundle:
```
{
    "fullUrl": "urn:uuid:bb1ad573-19b8-9cd8-68fb-0e6f684df992",
    "resource": {
      "resourceType": "Location",
      "id": "bb1ad573-19b8-9cd8-68fb-0e6f684df992",
      "status": "active",
      "description": "Patient's Home",
      "mode": "kind",
      "physicalType": {
        "coding": [ {
          "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
          "code": "ho",
          "display": "House"
        } ]
      }
    },
    "request": {
      "method": "POST",
      "url": "Location"
    }
  }
```

Here is an Encounter. Notice the location reference.
```
{
    "fullUrl": "urn:uuid:48cd26ad-03d0-d1ed-03ed-38c534490e4e",
    "resource": {
      "resourceType": "Encounter",
      "id": "48cd26ad-03d0-d1ed-03ed-38c534490e4e",
      "meta": {
        "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter" ]
      },
      "identifier": [ {
        "use": "official",
        "system": "https://github.com/synthetichealth/synthea",
        "value": "48cd26ad-03d0-d1ed-03ed-38c534490e4e"
      } ],
      "status": "finished",
      "class": {
        "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
        "code": "VR"
      },
      "type": [ {
        "coding": [ {
          "system": "http://snomed.info/sct",
          "code": "390906007",
          "display": "Hypertension follow-up encounter"
        } ],
        "text": "Hypertension follow-up encounter"
      } ],
      "subject": {
        "reference": "urn:uuid:5223c440-2e86-8470-fcde-69f56234897a",
        "display": "Mrs. Lorie307 Barabara924 Barrows492"
      },
      "participant": [ {
        "type": [ {
          "coding": [ {
            "system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
            "code": "PPRF",
            "display": "primary performer"
          } ],
          "text": "primary performer"
        } ],
        "period": {
          "start": "2021-02-21T23:04:44+00:00",
          "end": "2021-02-21T23:19:44+00:00"
        },  
        "individual": {
          "reference": "Practitioner?identifier=http://hl7.org/fhir/sid/us-npi|9999995795",
          "display": "Dr. Harland508 Ryan260"
        }
      } ],
      "period": {
        "start": "2021-02-21T23:04:44+00:00",
        "end": "2021-02-21T23:19:44+00:00"
      },
      "reasonCode": [ {
        "coding": [ {
          "system": "http://snomed.info/sct",
          "code": "59621000",
          "display": "Hypertension"
        } ]
      } ],
      "location": [ {
        "location": {
          "reference": "Location?identifier=https://github.com/synthetichealth/synthea|bb1ad573-19b8-9cd8-68fb-0e6f684df992",
          "display": "Patient's Home"
        }
      } ],
      "serviceProvider": {
        "reference": "Organization?identifier=https://github.com/synthetichealth/synthea|3d10019f-c88e-3de5-9916-6107b9c0263d",
        "display": "NEWTON-WELLESLEY HOSPITAL"
      }
    },
    "request": {
      "method": "POST",
      "url": "Encounter"
    }
  }
```

Since other locations have an identifier set I assume that the identifier needs to be added here: https://github.com/synthetichealth/synthea/blob/cd8062ebce51203f64cc48dfcb78c27c56166272/src/main/java/org/mitre/synthea/export/FhirR4PatientHome.java#L24

### Environment

```markdown
- OS: Ubuntu 22.04
- Java: 11
```


### Relevant log output

_No response_

Changed files:
src/main/java/org/mitre/synthea/export/FhirR4PatientHome.java, src/main/java/org/mitre/synthea/export/FhirR4.java

diff --git a/src/main/java/org/mitre/synthea/export/FhirR4.java b/src/main/java/org/mitre/synthea/export/FhirR4.java
index e7bad1df2..b83a33f0b 100644
--- a/src/main/java/org/mitre/synthea/export/FhirR4.java
+++ b/src/main/java/org/mitre/synthea/export/FhirR4.java
@@ -170,7 +170,7 @@ public class FhirR4 {
   private static final String UNITSOFMEASURE_URI = "http://unitsofmeasure.org";
   private static final String DICOM_DCM_URI = "http://dicom.nema.org/resources/ontology/DCM";
   private static final String MEDIA_TYPE_URI = "http://terminology.hl7.org/CodeSystem/media-type";
-  private static final String SYNTHEA_IDENTIFIER = "https://github.com/synthetichealth/synthea";
+  protected static final String SYNTHEA_IDENTIFIER = "https://github.com/synthetichealth/synthea";
 
   @SuppressWarnings("rawtypes")
   private static final Map raceEthnicityCodes = loadRaceEthnicityCodes();
diff --git a/src/main/java/org/mitre/synthea/export/FhirR4PatientHome.java b/src/main/java/org/mitre/synthea/export/FhirR4PatientHome.java
index 25be0a7cd..bcfa64e31 100644
--- a/src/main/java/org/mitre/synthea/export/FhirR4PatientHome.java
+++ b/src/main/java/org/mitre/synthea/export/FhirR4PatientHome.java
@@ -2,6 +2,7 @@ package org.mitre.synthea.export;
 
 import org.hl7.fhir.r4.model.CodeableConcept;
 import org.hl7.fhir.r4.model.Coding;
+import org.hl7.fhir.r4.model.Identifier;
 import org.hl7.fhir.r4.model.Location;
 import org.hl7.fhir.r4.model.codesystems.LocationPhysicalType;
 import org.mitre.synthea.world.agents.Person;
@@ -34,6 +35,9 @@ public class FhirR4PatientHome {
       // Not really generating a random UUID. Given that this is not tied to a particular provider
       // or person, this just makes up a person with a hardcoded random seed.
       patientHome.setId(new Person(1).randUUID().toString());
+      Identifier identifier = patientHome.addIdentifier();
+      identifier.setSystem(FhirR4.SYNTHEA_IDENTIFIER);
+      identifier.setValue(patientHome.getId());
     }
     return patientHome;
   }