R3 to R4 conversions with validator fail saying Encounter.reasonCode is an invalid property

Hi all,

Apologies in advance if I posted this in the wrong place.

I’m attempting to use org.hl7.fhir.validator.jar to do a conversion from R3 to R4 for a single Encounter resource. It fails, complaining that reasonCode is not a valid property.

I see that in R3 and R5 it’s called reason, but in R4 it was in fact called reasonCode. Worth noting that the stack trace refers to the r5 package despite having specified an R3 to R4 conversion in the arguments. Do I need to explicitly call an R4 validator class instead of R5?

Command line I’m using:
java -jar org.hl7.fhir.validator.jar encounter.in.fhir -version 3.0 -to-version 4.0.1 -output encounter.out.fhir

org.hl7.fhir.exceptions.FHIRException: Exception executing transform tgt.reasonCode = create() as vvv on Rule "reason": Attempt to get types for an invalid property 'reasonCode' on type Encounter
	at org.hl7.fhir.r5.utils.StructureMapUtilities.runTransform(StructureMapUtilities.java:1954)
	at org.hl7.fhir.r5.utils.StructureMapUtilities.processTarget(StructureMapUtilities.java:1825)
	at org.hl7.fhir.r5.utils.StructureMapUtilities.executeRule(StructureMapUtilities.java:1412)
	at org.hl7.fhir.r5.utils.StructureMapUtilities.executeGroup(StructureMapUtilities.java:1399)
	at org.hl7.fhir.r5.utils.StructureMapUtilities.transform(StructureMapUtilities.java:1361)
	at org.hl7.fhir.validation.ValidationEngine.transformVersion(ValidationEngine.java:1754)
	at org.hl7.fhir.validation.cli.services.ValidationService.transformVersion(ValidationService.java:157)
	at org.hl7.fhir.validation.Validator.main(Validator.java:168)
Caused by: org.hl7.fhir.exceptions.FHIRException: Attempt to get types for an invalid property 'reasonCode' on type Encounter
	at org.hl7.fhir.r5.model.Base.getTypesForProperty(Base.java:330)
	at org.hl7.fhir.r5.elementmodel.Element.getTypesForProperty(Element.java:707)
	at org.hl7.fhir.r5.utils.StructureMapUtilities.runTransform(StructureMapUtilities.java:1850)
	... 7 more