No snapshot generated
# support
a
Hi, I am trying to create a validation profile using your config from the tutorial (https://www.medplum.com/docs/fhir-datastore/profiles)
Copy code
id: medplum-example-profiles
canonical: https://medplum.com/profiles/example-fsh-profiles
version: 1.0.0
name: MedplumExampleProfiles
title: "Medplum Example FSH Profiles"
description: "Example FHIR profiles for Medplum using FSH"
fhirVersion: 4.0.1
copyrightYear: 2024+
releaseLabel: STU1
status: active
Unfortunately my output files have no snapshot field. I can upload it successfully by importing json and doing
Copy code
const res = await medplum.createResource(fsh);
but when I try to validate against it by adding
Copy code
resourceType: 'Patient',
meta: {
        profile: ['https://medplum.com/profiles/example-fsh-profiles/StructureDefinition/my-patient']
},
to create patient resource I am getting this error "Failed to create patient: Error: No snapshot defined for StructureDefinition 'MyPatient'". I also tried to use this jar https://github.com/HL7/fhir-ig-publisher/releases/latest/download/publisher.jar to generate snapshots. What's the proper way of creating a profile that I can use to validate my patients?
l
CC @finnbergquist could you perhaps help us on this one?
n
Not an expert but I think you may need to pass
--snapshot
to the
sushi
command https://fshschool.org/docs/sushi/running/#--snapshot
l
thanks @nathan-watkins-unityai ! We'll give that a try
a
It worked, thank you so much for your help
n
nice, glad it worked- opened a [PR to update the docs](https://github.com/medplum/medplum/pull/7941)
46 Views