Validate against your package

If you have followed exercises #2 Download and use a package and #3 Create a package you will now have published your package that contains your profile. Let's repeat the first exercise but now using your package.

Prerequisites

1. Validate instance

An example instance of your profile is given below in JSON and is accesible through this link: acme-product-labx-INVALID-no-meta-profile. This instance should be invalid against your created profile.

{
    "resourceType": "Observation",
    "id": "acme-product-labx-INVALID-no-meta-profile",
    "meta": {
        "profile":  [
            "ADD YOUR PROFILE CANONICAL URL HERE"
        ]
    },
    "status": "final",
    "category":  [
        {
            "coding":  [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/observation-category",
                    "code": "laboratory",
                    "display": "Laboratory"
                }
            ],
            "text": "Laboratory"
        }
    ],
    "code": {
        "coding":  [
            {
                "system": "http://loinc.org",
                "code": "789-8",
                "display": "RBC # Bld Auto"
            }
        ],
        "text": "RBC # Bld Auto"
    },
    "subject": {
        "reference": "Patient/example",
        "display": "Amy Shaw"
    },
    "effectiveDateTime": "2015-07-05",
    "valueString": "4.58 - 10*6/uL",
    "interpretation":  [
        {
            "coding":  [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
                    "code": "N-8",
                    "display": "Normal"
                }
            ]
        }
    ]
}

 

  • Copy or download the example instance
  • Update the Observation.meta.profile to the canonical URL of your created profile
  • Navigate to simplifier.net/validate and paste the example
  • Search for your package and select the appropriate version
  • Validate!

The instance should be invalid. Examine the results.

2. Adjust the instance so it conforms to your profile

You can now easily try out different variations of the instance against your profile. Try to make a valid instance of your profile!

Hint: acme-product-labx-VALID-no-meta-profile

3. Bonus points

Try out more profiling constraints or different Resources. The following steps may be helpful.

  • Add constraints to your profile or create a complete new one
  • Upload your changes to your project
  • Create a new version of your package
  • Validate a new instance against this package