Compliance to USCDI V3 specifications use the HL7 provided Implementation Guide #3752
Replies: 3 comments 6 replies
-
@AhsanSpica for uploading Implementation Guide to a FHIR Server. Link to the tool: https://github.com/brianpos/UploadFIG To validate profile, please refer to the documentation https://learn.microsoft.com/en-us/azure/healthcare-apis/fhir/validation-against-profiles . Please let us know if you have questions after reviewing the above material. |
Beta Was this translation helpful? Give feedback.
-
When i send request to my fhirServer with resourcetype SrtuctureDefinition. I am able to see only 10 out of 73 of the structuredefintons with version 7 and it shows taht they are us core 6 and USCDI V3 but how do i verify the version of resource via code from the fhir server? The Get Request StructureDefinition/Patient isnt returning anything. |
Beta Was this translation helpful? Give feedback.
-
Compliance to USCDI V3 specifications use the provided Implementation Guide:
Any clinical product such as EMR have an interoperability certification requirement mandated by ONC. Due to this certification requirement the EMR needs to be integrated with a FHIR mechanism. which means it is both able to send in FHIR format the resources that are defined in the ONC USCDI V3 and the resources should adhere to the the USCDI V3 structuredefinitions.
basically in order to use the fhirserver microsoft open source for production and for it to be integrated /connected with products, the products need to satisfy the USCDI V3 requirements for the resources it defines. it also means that these resources need to match the structure definition provided under this description.
the fhir ONC requirements are defined here :
https://www.healthit.gov/isa/united-states-core-data-interoperability-uscdi#uscdi-v3
the hl7 fhir resources that adhere to this ONC USCDI v3 requirement are listed here :
https://build.fhir.org/ig/HL7/US-Core/uscdi.html
the package where the Implementation Guide for the USCDI V3 is provided.
https://build.fhir.org/ig/HL7/US-Core/downloads.html
it is understood that this IG also defines the structuredefintions that the listed resources need to adhere to.
So i am putting forward my appeal for help in this matter. And raising high - priority questions in the above context.
Question1 : Option 1
So my question is simple . please provide help to define the USCDI V3 IG for this open source microstft fhir soltuion.
My thought process and approach is that the fhir server already exposes all the necessary FHIR resource CRUD apis. So if the fhir server complies to the IG then it is satisfies the ONC requirement of FHIR-Resource Data adhering to the USCDI V3. And the requirement of ONC that the APIS exposed must COMPLY to the USCDI V3.
PItfall /AntiPattern : Please don't comment that i should use the implementaionguide class, it is a dummy class in the project it doesn't do anything.
Question1.b : Option 1 : there is a strong possibility that the USCDI v3 cannot be described or defined for this solution from the application solution level, or the code level. But from the azure level where this microsoft solution is getting most of its information for this application. please provide any concrete ideas where to define for this application?
Question 2.a : Option 2: To satisfy the ONC requirement if a validation solution on the connector level (the integration code inside the application client that is connecting the fhir server) to validate the resource in adherence to the USCDI v3, is a better approach or the easier one , or the only one. then please someone anyone help with this validation of outgoing resource.
Question 2.b : Option 2: I am using the firely 'tructuredefinition.Validate' method to validate the Post Request Resource to the FHir server from the client application in this case the EMR. is this method the right approach for validation ? if so then please provide me with any success and fail test cases for this particular method.
I started with validation from the connecter bridge level in the emr. my intention was to code the validation and other integration code and create dlls and include them in the EMR for reuse in other products.
the following code takes the package file and uses the firely to get the structuredefinition that matches with incoming resource.
I am using the firely structuredefinition. Validate method to validate the Post Request Resource. I am providing code i have implemented for validation
public static OperationOutcome ValidateResourceUSCDIV3(Resource resource)
{
var package1 = "../SolutionItems/package.tgz";
FhirPackageSource resolver = new(ModelInfo.ModelInspector, new string[] { package1 });
var uri = "http://hl7.org/fhir/us/core/StructureDefinition/us-core-" + resource.TypeName.ToLower();
var canonicalUrisList = resolver.ListCanonicalUris();
var resourceuris = resolver.ListResourceUris();
List structDefList = new List();
StructureDefinition structDef = null;
foreach (var resourceuri in canonicalUrisList)
{
var temp = resolver.FindStructureDefinitionAsync(resourceuri).GetAwaiter().GetResult();
if (temp != null)
{
structDefList.Add(temp);
}
}
var structureDefinition = resolver.FindStructureDefinitionAsync(uri).GetAwaiter().GetResult();
if (structureDefinition == null)
{
return OperationOutcome.ForMessage("Resource is valid.", OperationOutcome.IssueType.Informational, OperationOutcome.IssueSeverity.Information);
}
var serializer = new FhirJsonSerializer();
var resourceJson = serializer.SerializeToString(resource);
var parser = new FhirJsonParser();
var resourceElement = resource.ToTypedElement();
var outcome = ValidateAgainstStructureDefinition(resource, structureDefinition);
return outcome;
}
public static OperationOutcome ValidateAgainstStructureDefinition(Resource resource, StructureDefinition structureDefinition)
{
var operationOutcome = new OperationOutcome();
var validationContext = new ValidationContext(resource);
var validationResults2= structureDefinition.Validate(validationContext);
ICollection validationResults = new List();
var isValid = resource.TryValidate((ICollection?)validationResults, recurse: true, narrativeValidation: NarrativeValidationKind.FhirXhtml);
if (!isValid)
{
foreach (var validationResult in validationResults)
{
operationOutcome.AddIssue(new OperationOutcome.IssueComponent
{
Severity = OperationOutcome.IssueSeverity.Error,
Code = OperationOutcome.IssueType.Invalid,
Diagnostics = validationResult.ErrorMessage
});
}
}
return operationOutcome;
}
As you can see that the package is in the USCDI v3, in the description field in the provided object view.
Community Benefits : discussion in this topic will benefit all developers in learning more about where in this application are the resource structure definitions defined.
How to validate the resources according to USCDI V3.
Learn More about using Firely
Beta Was this translation helpful? Give feedback.
All reactions