Generating structures from FHIR XSD incomplete

I downloaded the FHIR 4.0 When generating my target code (using the fhir-single.xsd) I noticed that the valid values for Medication.status are limited to three values: [active, inactive, entered-in-error]. However, when I review the Medication Statement on the web page: MedicationStatement - FHIR v4.0.1 the Medication.status element shows the valid values as: [active, completed, entered-in-error, intended, stopped, on-hold, unknown, not-taken]. The link to the possible values also shows the expanded list. (Valueset-medication-statement-status - FHIR v4.0.1)
Can you tell me which one is correct?

you were looking at MedicationAdministration.status not Medication.status

Sorry, I was looking at MedicationStatement. But looking at Medication and MedicationStatus, in the XSD, they both have a ‘status’ element that references MedicationStatusCodes, which defines its value as MedicationStatusCodes-list, has only active, inactive and entered-in-error.

One of the extra valid values listed in the MedicationStatus web page is “intended”. However, in all of the fhir-single.xsd, the only list that has that value is DeviceUseStatementStatus-list.

What “MedicationStatus” web page are you looking at. If you’re looking at R4, I see the following:
Neither have ‘intended’

Go to my original text and the MedicationStatement link (I’m new to the forum so it won’t let me put in any more links). On the MedicationStatement page, click the XML tab for the Resource Content. Look for the “status” member. You will see the larger list of 7 items. If you click that link, it will also show the larger list.

I agree that the pages you listed have the values that are in the XSD, but the values listed on the MedicationStatement page are different than the XSD.

Well, that’s unfortunate. I’m not sure what I can do about that

That’s the statuses for MedicationStatement, not the statuses for Medication.
Those go here: Valueset-medication-statement-status - FHIR v4.0.1 - which is exactly the same set as shown in the XML view.

So, for the MedicationStatement, which set of documentation is correct? The web page or the XSD?

the xsd is wrong and the web page is correct

Can we get the XSD corrected?

Does any of the other formats have the correct info besides just the web page?

Please submit it as a Jira issue and we can try to get it fixed as part of the R4B release.